[packages] polipo: solve a bunch of "sh: bad number" errors in init script, always allow 127.0.0.1

git-svn-id: svn://svn.openwrt.org/openwrt/packages@24260 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2010-12-05 14:08:56 +00:00
parent f9f5ad0e80
commit 2e2bfa33a3
2 changed files with 10 additions and 2 deletions

View 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/

View 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 = "