X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/15b63637b4acc1f474148c160cda9f07be351dd0..326a9590d17b63c4a0c70ce9d91f5b7aef00e12f:/package/firewall/files/lib/core.sh diff --git a/package/firewall/files/lib/core.sh b/package/firewall/files/lib/core.sh index f37b1e696..5880cd3ac 100644 --- a/package/firewall/files/lib/core.sh +++ b/package/firewall/files/lib/core.sh @@ -8,14 +8,13 @@ include /lib/network fw_start() { fw_init - lock /var/lock/firewall.start - FW_DEFAULTS_APPLIED= fw_is_loaded && { echo "firewall already loaded" >&2 exit 1 } + uci_set_state firewall core "" firewall_state fw_clear DROP @@ -51,8 +50,6 @@ fw_start() { fw_callback post core uci_set_state firewall core loaded 1 - - lock -u /var/lock/firewall.start } fw_stop() { @@ -84,7 +81,7 @@ fw_reload() { } fw_is_loaded() { - local bool=$(uci -q -P /var/state get firewall.core.loaded) + local bool=$(uci_get_state firewall.core.loaded) return $((! ${bool:-0})) }