If the system's python is set for version 3, firewalld fails to start with the message: firewalld | * Caching service dependencies ...[ ok ] firewalld | * Starting firewalld ... firewalld | File "/usr/sbin/firewalld", line 107 firewalld | os.umask(os.umask(0077) | 0022) Setting python with eselect to 2.7 and restarting the service solves the problem. If the python version is then put back to 3, firewalld will now start ok. Reproducible: Always Steps to Reproduce: (starting with a fresh gentoo install) 1. Set python to 3.2 2. Install libvirtd with firewalld 3. /etc/init.d/firewalld start 4. fail! Actual Results: firewalld | * Caching service dependencies ... [ ok ] firewalld | * Starting firewalld ... firewalld | File "/usr/sbin/firewalld", line 107 firewalld | os.umask(os.umask(0077) | 0022) firewalld | ^ firewalld |SyntaxError: invalid token firewalld | * start-stop-daemon: failed to start `/usr/sbin/firewalld' firewalld | * Failed to start firewalld [ !! ] firewalld | * ERROR: firewalld failed to start Expected Results: /etc/init.d/firewalld starts
same here, changing line 1 of /usr/sbin/firewalld to #!/usr/bin/python2 fixes the problem.
I just ran into this as well, with the same behavior described by Gianni.
Hit this on an ~amd64 systemd system. Confirmed that changing the shebangs in /usr/sbin/firewalld /usr/bin/firewall-applet /usr/bin/firewall-cmd /usr/bin/firewall-config /usr/bin/firewall-offline-cmd fixes the issue. This is affecting both 0.2.9-r1 and 0.2.12.
+1 "same here, changing line 1 of /usr/sbin/firewalld to #!/usr/bin/python2 fixes the problem."
solved in version bump to 0.3.10 (by supporting py3k, but wrapper scripts are now installed properly)