summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-11-05 15:05:08 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-11-05 15:05:08 +0100
commit4b4db585a4159015f56734999b0a1fde2d106489 (patch)
tree24e0eecc2a9cd4e06a348c8eb46ae5331f61b93f
parent50ee3b905eadd77c38c45f67ee63a115ebcc7997 (diff)
handle empty variables in network script
-rw-r--r--package/ppp/Makefile2
-rwxr-xr-xpackage/ppp/files/ppp.pre-up9
2 files changed, 7 insertions, 4 deletions
diff --git a/package/ppp/Makefile b/package/ppp/Makefile
index df995bfa3..5ce611b16 100644
--- a/package/ppp/Makefile
+++ b/package/ppp/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= ppp
PKG_VERSION:= 2.4.5
-PKG_RELEASE:= 4
+PKG_RELEASE:= 5
PKG_MD5SUM:= 4621bc56167b6953ec4071043fe0ec57
PKG_DESCR:= Point-to-Point Protocol software
PKG_SECTION:= ppp
diff --git a/package/ppp/files/ppp.pre-up b/package/ppp/files/ppp.pre-up
index 7f28f32da..6c0b59c7f 100755
--- a/package/ppp/files/ppp.pre-up
+++ b/package/ppp/files/ppp.pre-up
@@ -11,11 +11,14 @@
}
IDLEOPTIONS="persist\nmaxfail 0"
-if [ "$IF_PPP_IDLETIME" -gt 0 ]; then
+[ "$IF_PPP_IDLETIME" ] && {
+ if [ "$IF_PPP_IDLETIME" -gt 0 ]; then
IDLEOTPIONS="idletime $IF_PPP_IDLETIME"
-fi
+ fi
+}
-if [ "$IF_PPP_MTU" -gt 0 ] ; then
+[ "$IF_PPP_MTU" ] || IF_PPP_MTU=1412
+if [ "$IF_PPP_MTU" -gt 0 ] ; then
NETWORKOPTIONS="mtu $IF_PPP_MTU\nmru $IF_PPP_MTU"
fi