luci-0.9: merge r4861
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 16 Jun 2009 23:05:44 +0000 (23:05 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 16 Jun 2009 23:05:44 +0000 (23:05 +0000)
contrib/package/freifunk-firewall/Makefile

index d2ae0758829ed8f03e55720c2e79264f4324295d..24be151e4f4652c392e508cb542f7f2e0af5ebdd 100644 (file)
@@ -37,12 +37,13 @@ endef
 
 define Package/freifunk-firewall/postinst
 #!/bin/sh
-
-if ! grep -q /etc/firewall.freifunk /etc/config/firewall; then
-  uci add firewall include >/dev/null
-  uci set firewall.@include[-1].path=/etc/firewall.freifunk
-  uci commit firewall
-fi
+[ -n "${IPKG_INSTROOT}" ] || {
+  if ! grep -q /etc/firewall.freifunk /etc/config/firewall; then
+    uci add firewall include >/dev/null
+    uci set firewall.@include[-1].path=/etc/firewall.freifunk
+    uci commit firewall
+  fi
+}
 endef
 
 define Package/freifunk-firewall/install