net-firewall/nftables: fixing the rules creating bug 634804
authorMatthew Thode <prometheanfire@gentoo.org>
Wed, 25 Oct 2017 13:32:33 +0000 (08:32 -0500)
committerMatthew Thode <prometheanfire@gentoo.org>
Wed, 25 Oct 2017 13:32:51 +0000 (08:32 -0500)
Bug: 634804
Package-Manager: Portage-2.3.8, Repoman-2.3.3

net-firewall/nftables/nftables-0.8-r3.ebuild [moved from net-firewall/nftables/nftables-0.8-r2.ebuild with 79% similarity]

similarity index 79%
rename from net-firewall/nftables/nftables-0.8-r2.ebuild
rename to net-firewall/nftables/nftables-0.8-r3.ebuild
index 4656176d0d391687c18743cb4a1093c87fbb7cbf..00a30dec484818daa984173aeb6c8fade9c1f911 100644 (file)
@@ -72,13 +72,13 @@ pkg_postinst() {
        local save_file
        save_file="${EROOT%/}/var/lib/nftables/rules-save"
 
-       elog "In order for the nftables-restore systemd service to start, "
-       elog "the file, ${save_file}, must exist.  To create this "
-       elog "file run the following command: "
-       elog ""
-       elog "  touch '${save_file}'"
-       elog ""
-       elog "Afterwards, the nftables-restore service should be manually started "
-       elog "to ensure firewall changes are stored on system shutdown.  The "
-       elog "systemd service will function normally thereafter."
+       # In order for the nftables-restore systemd service to start
+       # the save_file must exist.
+       if [[ ! -f ${save_file} ]]; then
+               touch ${save_file}
+       fi
+
+       elog "If you are creating firewall rules before the next system restart "
+       elog "the nftables-restore service must be manually started in order to "
+       elog "save those rules on shutdown."
 }