From 06f94d753f3783689da3e3f670561e2c1a1216b4 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 10 Apr 2011 00:24:48 -0700 Subject: [PATCH] Android pppd doesn't setenv LINKNAME, check the filename --- init.etc/ppp/ip-down-gprs | 5 ++++- init.etc/ppp/ip-up-gprs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/init.etc/ppp/ip-down-gprs b/init.etc/ppp/ip-down-gprs index 6a5ab82..ebf2db3 100755 --- a/init.etc/ppp/ip-down-gprs +++ b/init.etc/ppp/ip-down-gprs @@ -7,8 +7,11 @@ ppp1) ;; esac +# Use yyy of ip-xx-yyy in program name +LINK=`echo $0 | cut -d- -f3` +NAME=${LINK:-"$LINKNAME"} # Use interface name if linkname is not available -NAME=${LINKNAME:-"$1"} +NAME=${NAME:-"$1"} /system/bin/setprop "net.$NAME.dns1" "$DNS1" /system/bin/setprop "net.$NAME.dns2" "$DNS2" diff --git a/init.etc/ppp/ip-up-gprs b/init.etc/ppp/ip-up-gprs index eeefd22..96531f6 100755 --- a/init.etc/ppp/ip-up-gprs +++ b/init.etc/ppp/ip-up-gprs @@ -1,7 +1,10 @@ #!/system/bin/sh +# Use yyy of ip-xx-yyy in program name +LINK=`echo $0 | cut -d- -f3` +NAME=${LINK:-"$LINKNAME"} # Use interface name if linkname is not available -NAME=${LINKNAME:-"$1"} +NAME=${NAME:-"$1"} case $1 in ppp1) -- 2.1.4