Skip to content

Commit 41fe8a1

Browse files
committed
Fixing firewalld definitions and rpm spec
1 parent ab45418 commit 41fe8a1

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<service>
33
<short>WS-Discovery Host Daemon (HTTP Interface)</short>
4-
<description>Allows your machine to be discovered by Windows 10 and above systems and displayed by their Explorer "Network" views.</description>
4+
<description>Allows your machine to be discovered by Windows 10 and above systems and displayed by their Explorer &quot;Network&quot; views.</description>
55
<port port="5357" protocol="tcp"/>
66
</service>

config/firewalls/etc/firewalld/services/wsddn.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<service>
33
<short>WS-Discovery Host Daemon</short>
4-
<description>Allows your machine to be discovered by Windows 10 and above systems and displayed by their Explorer "Network" views.</description>
4+
<description>Allows your machine to be discovered by Windows 10 and above systems and displayed by their Explorer &quot;Network&quot; views.</description>
55
<port port="3702" protocol="udp"/>
66
<destination ipv4="239.255.255.250" ipv6="FF02::C"/>
77
<include service="wsddn-http"/>

installers/rpm/wsddn.spec

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Conflicts: wsdd
1919

2020
%description
2121
Allows your Linux machine to be discovered by Windows 10 and above systems
22-
and displayed by their Explorer "Network" views.
22+
and displayed by their Explorer "Network" views.
2323

2424
%debug_package
2525

@@ -71,8 +71,8 @@ install -m 0644 config/firewalls/etc/firewalld/services/%{name}-http.xml \
7171

7272
%post
7373
%systemd_post wsddn.service
74-
if [ $1 -eq 1 ] ; then
75-
# Initial installation
74+
if [ $1 -eq 1 ] ; then
75+
# Initial installation
7676
firewall-cmd --reload > /dev/null 2>&1 || :
7777
firewall-cmd --zone=public --add-service=wsddn --permanent > /dev/null 2>&1 || :
7878
firewall-cmd --reload > /dev/null 2>&1 || :
@@ -83,8 +83,9 @@ fi
8383

8484
%postun
8585
%systemd_postun_with_restart wsddn.service
86-
if [ $1 -eq 0 ] ; then
87-
# Package removal, not upgrade
86+
if [ $1 -eq 0 ] ; then
87+
# Package removal, not upgrade
88+
# Older versions opened ports explicitly without service
8889
firewall-cmd --zone=public --remove-port=5357/tcp --permanent > /dev/null 2>&1 || :
8990
firewall-cmd --zone=public --remove-port=3702/udp --permanent > /dev/null 2>&1 || :
9091
firewall-cmd --zone=public --remove-service=wsddn --permanent > /dev/null 2>&1 || :

0 commit comments

Comments
 (0)