From: Jo-Philipp Wich Date: Sun, 5 Dec 2010 14:08:56 +0000 (+0000) Subject: [packages] polipo: solve a bunch of "sh: bad number" errors in init script, always... X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=761cb103d9fe9d076ec31a9be42b7b7e3385ff8d;p=openwrt%2Fsvn-archive%2Farchive.git [packages] polipo: solve a bunch of "sh: bad number" errors in init script, always allow 127.0.0.1 SVN-Revision: 24260 --- diff --git a/net/polipo/Makefile b/net/polipo/Makefile index 51c3e617bd..5fd60470d8 100644 --- a/net/polipo/Makefile +++ b/net/polipo/Makefile @@ -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/ diff --git a/net/polipo/files/polipo.init b/net/polipo/files/polipo.init index 128fca2843..5b5d54ce4d 100644 --- a/net/polipo/files/polipo.init +++ b/net/polipo/files/polipo.init @@ -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 = "