diff --git a/package/gargoyle-tor/files/tor.firewall b/package/gargoyle-tor/files/tor.firewall index 639895a78..141d4c84d 100644 --- a/package/gargoyle-tor/files/tor.firewall +++ b/package/gargoyle-tor/files/tor.firewall @@ -4,6 +4,7 @@ . /usr/lib/bwmon-gargoyle/functions.sh bwmonscript="/usr/lib/bwmon-gargoyle/bwmon-gargoyle.d/050-tor.bwmon" +tmp_cron="/tmp/tmp.tor.cron" if [ -f /tmp/tor.firewall.running ] ; then exit diff --git a/package/gargoyle/files/usr/lib/gargoyle/manage_groups.sh b/package/gargoyle/files/usr/lib/gargoyle/manage_groups.sh index 2d2be6c81..8ed02bb1c 100755 --- a/package/gargoyle/files/usr/lib/gargoyle/manage_groups.sh +++ b/package/gargoyle/files/usr/lib/gargoyle/manage_groups.sh @@ -35,7 +35,7 @@ for group in $groups; do done # Remove sets whose group no longer exists in UCI -for existing in $(nft list sets "$NFT_FAMILY" "$NFT_TABLE" 2>/dev/null | awk '/set grp_/{print $2}'); do +for existing in $(nft list table "$NFT_FAMILY" "$NFT_TABLE" 2>/dev/null | awk '/set grp_/{print $2}'); do found=0 for wanted in $desired_sets; do [ "$existing" = "$wanted" ] && found=1 && break @@ -60,3 +60,9 @@ for group in $groups; do [ -n "$ip" ] && nft add element "$NFT_FAMILY" "$NFT_TABLE" "$setname" \{ "$ip" \} 2>/dev/null done done + +# Without this, the script's exit code is whatever its last internal [ -n "$ip" ] +# check happened to evaluate to - a caller checking $? would see a spurious +# failure whenever the last device processed simply had no active lease yet, +# even though the script completed all its work correctly. +exit 0 diff --git a/package/gargoyle/files/usr/lib/gargoyle/restart_firewall.sh b/package/gargoyle/files/usr/lib/gargoyle/restart_firewall.sh index bf93a1f0c..8fb493bd2 100755 --- a/package/gargoyle/files/usr/lib/gargoyle/restart_firewall.sh +++ b/package/gargoyle/files/usr/lib/gargoyle/restart_firewall.sh @@ -1,4 +1,4 @@ -# This program is copyright © 2008 Eric Bishop and is distributed under the terms of the GNU GPL +# This program is copyright � 2008 Eric Bishop and is distributed under the terms of the GNU GPL # version 2.0 with a special clarification/exception that permits adapting the program to # configure proprietary "back end" software provided that all modifications to the web interface # itself remain covered by the GPL. @@ -27,3 +27,9 @@ service_enabled miniupnpd && /etc/init.d/miniupnpd start service_enabled bwmon_gargoyle && /etc/init.d/bwmon_gargoyle start service_enabled webmon_gargoyle && /etc/init.d/webmon_gargoyle start +# Without this, the script's exit code is whatever the last "service_enabled +# X && /etc/init.d/X start" happened to evaluate to - a caller checking $? +# sees a spurious failure whenever the last-checked optional service simply +# isn't enabled, even though the firewall restart itself succeeded. +exit 0 +