[packages] polipo: solve a bunch of "sh: bad number" errors in init script, always...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Dec 2010 14:08:56 +0000 (14:08 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Dec 2010 14:08:56 +0000 (14:08 +0000)
SVN-Revision: 24260

net/polipo/Makefile
net/polipo/files/polipo.init

index 51c3e61..5fd6047 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=polipo
 PKG_VERSION:=1.0.4.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://freehaven.net/~chrisd/polipo/
index 128fca2..5b5d54c 100644 (file)
@@ -113,7 +113,7 @@ polipo_atom() {
        local SECTION=$1
        local OPTION=$2
        local QUOTE=$3
-       local EMPTY_DISABLED=$4
+       local EMPTY_DISABLED=${4:-0}
 
        config_get _value "$SECTION" "$OPTION"
        [ -n "$_value" -o "$EMPTY_DISABLED" -eq "1" ] && {
@@ -138,6 +138,14 @@ polipo_list() {
        local QUOTE=$3
 
        config_get _value "$SECTION" "$OPTION"
+       
+       [ "$SECTION" = general ] && [ "$OPTION" = allowedClients ] && {
+               case "$_value" in
+                       *127.0.0.1*) : ;;
+                       *) _value="127.0.0.1 $_value" ;;
+               esac
+       }
+       
        [ -n "$_value" ] && {
                echo -n "$OPTION = "