PKG_NAME:=pbr
PKG_VERSION:=1.0.1
-PKG_RELEASE:=10
+PKG_RELEASE:=14
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
uci -q delete firewall.pbr || true
- echo "Stopping pbr service... "
- /etc/init.d/pbr stop || true
+ echo -n "Stopping pbr service... "
+ /etc/init.d/pbr stop && echo "OK" || echo "FAIL"
echo -n "Removing rc.d symlink for pbr... "
/etc/init.d/pbr disable && echo "OK" || echo "FAIL"
fi
#!/bin/sh
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
- echo -n "Installing rc.d symlink for pbr... "
+ echo -n "Installing rc.d symlink for pbr-iptables... "
/etc/init.d/pbr enable && echo "OK" || echo "FAIL"
fi
exit 0
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
uci -q delete firewall.pbr || true
- echo "Stopping pbr service... "
- /etc/init.d/pbr stop || true
- echo -n "Removing rc.d symlink for pbr... "
+ echo -n "Stopping pbr-iptables service... "
+ /etc/init.d/pbr stop && echo "OK" || echo "FAIL"
+ echo -n "Removing rc.d symlink for pbr-iptables... "
/etc/init.d/pbr disable && echo "OK" || echo "FAIL"
fi
exit 0
#!/bin/sh
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
- echo -n "Installing rc.d symlink for pbr... "
+ echo -n "Installing rc.d symlink for pbr-netifd... "
/etc/init.d/pbr enable && echo "OK" || echo "FAIL"
- # echo -n "Installing netifd support for pbr... "
- # /etc/init.d/pbr netifd install && echo "OK" || echo "FAIL"
- # echo -n "Restarting network... "
- # /etc/init.d/network restart && echo "OK" || echo "FAIL"
fi
exit 0
endef
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
uci -q delete firewall.pbr || true
- echo "Stopping pbr service... "
- /etc/init.d/pbr stop || true
- # echo -n "Removing netifd support for pbr... "
- # /etc/init.d/pbr netifd remove && echo "OK" || echo "FAIL"
+ echo -n "Stopping pbr-netifd service... "
+ /etc/init.d/pbr stop && echo "OK" || echo "FAIL"
echo -n "Removing rc.d symlink for pbr... "
/etc/init.d/pbr disable && echo "OK" || echo "FAIL"
- # echo -n "Restarting network... "
- # /etc/init.d/network restart && echo "OK" || echo "FAIL"
fi
exit 0
endef
case "$command" in
add)
- ips4 -q -! add "$ipset4" comment "$comment" && ipv4_error=0
- ips6 -q -! add "$ipset6" comment "$comment" && ipv6_error=0
+ ips4 -q -! add "$ipset4" ["$param"] comment "$comment" && ipv4_error=0
+ ips6 -q -! add "$ipset6" ["$param"] comment "$comment" && ipv6_error=0
;;
add_agh_element)
[ -n "$ipv6_enabled" ] || unset ipset6
fi
}
+boot() {
+ ubus -t 30 wait_for network.interface 2>/dev/null
+ rc_procd start_service 'on_boot'
+}
+
on_firewall_reload() {
if [ -z "$(ubus_get_status 'gateways')" ]; then # service is not running, do not start it on firewall reload
logger -t "$packageName" "Reload on firewall action aborted: service not running."