source:
freewrt/package/rp-pppoe/patches/rp-pppoe-3.5-scripts-fixes.patch
| Last change on this file was 475ad56, checked in by , 20 years ago | |
|---|---|
|
|
| File size: 6.3 KB | |
-
scripts/adsl-connect.in
diff -ruN rp-pppoe-3.5-orig/scripts/adsl-connect.in rp-pppoe-3.5-4/scripts/adsl-connect.in
old new 18 18 # Usage: adsl-connect [config_file] 19 19 # adsl-connect interface user [config_file] 20 20 # Second form overrides USER and ETH from config file. 21 # If config_file is omitted, defaults to /etc/ /ppp/pppoe.conf21 # If config_file is omitted, defaults to /etc/pppoe.conf 22 22 # 23 23 #*********************************************************************** 24 24 … … 30 30 # Paths to programs 31 31 IFCONFIG=/sbin/ifconfig 32 32 PPPD=@PPPD@ 33 SETSID= @SETSID@33 SETSID= 34 34 PPPOE=@sbindir@/pppoe 35 35 LOGGER="/usr/bin/logger -t `basename $0`" 36 36 37 #MODPROBE=modprobe 38 MODPROBE=insmod 39 37 40 # Set to "C" locale so we can parse messages from commands 38 41 LANG=C 39 42 export LANG 40 43 41 # Must be root42 if test "`@ID@ -u`" != 0 ; then43 echo "$0: You must be root to run this script" >& 244 exit 145 fi46 47 44 if test "$SETSID" != "" -a ! -x "$SETSID"; then 48 45 SETSID="" 49 46 fi 50 47 51 CONFIG=/etc/ /ppp/pppoe.conf48 CONFIG=/etc/pppoe.conf 52 49 USER="" 53 50 ETH="" 54 51 … … 117 114 if test `uname -s` = Linux ; then 118 115 $IFCONFIG $ETH up mtu 1500 119 116 # For 2.4 kernels. Will fail on 2.2.x, but who cares? 120 modprobeppp_generic > /dev/null 2>&1121 modprobeppp_async > /dev/null 2>&1122 modprobeppp_synctty > /dev/null 2>&1117 $MODPROBE ppp_generic > /dev/null 2>&1 118 $MODPROBE ppp_async > /dev/null 2>&1 119 $MODPROBE ppp_synctty > /dev/null 2>&1 123 120 if test -n "$LINUX_PLUGIN" ; then 124 modprobepppox > /dev/null 2>&1125 modprobepppoe > /dev/null 2>&1121 $MODPROBE pppox > /dev/null 2>&1 122 $MODPROBE pppoe > /dev/null 2>&1 126 123 fi 127 124 fi 128 125 … … 131 128 PPPD_SYNC=sync 132 129 # Increase the chances of it working on Linux... 133 130 if test `uname -s` = Linux ; then 134 modproben_hdlc > /dev/null 2>&1131 $MODPROBE n_hdlc > /dev/null 2>&1 135 132 fi 136 133 else 137 134 PPPOE_SYNC="" … … 204 201 205 202 # Interface name MUST BE LAST!! 206 203 PLUGIN_OPTS="$PLUGIN_OPTS $ETH" 207 modprobepppoe > /dev/null 2>&1204 $MODPROBE pppoe > /dev/null 2>&1 208 205 fi 209 206 210 207 if test "$DEFAULTROUTE" != "no" ; then -
scripts/adsl-setup.in
diff -ruN rp-pppoe-3.5-orig/scripts/adsl-setup.in rp-pppoe-3.5-4/scripts/adsl-setup.in
old new 27 27 LANG=C 28 28 export LANG 29 29 30 CONFIG=/etc/ppp /pppoe.conf30 CONFIG=/etc/pppoe.conf 31 31 32 32 # Protect created files 33 33 umask 077 … … 46 46 $ECHO "properly..." 47 47 $ECHO "" 48 48 49 # Must be root50 if [ "`@ID@ -u`" != 0 ] ; then51 $ECHO "$0: Sorry, you must be root to run this script"52 exit 153 fi54 55 49 # Prototype config file must exist 56 50 if [ ! -r "$CONFIG" ] ; then 57 51 $ECHO "Oh, dear, I don't see the file '$CONFIG' anywhere. Please" … … 280 274 fi 281 275 fi 282 276 283 # Where is pppd likely to put its pid? 284 if [ -d /var/run ] ; then 285 VARRUN=/var/run 286 else 287 VARRUN=/etc/ppp 288 fi 277 VARRUN=/var/run 289 278 290 279 # Some #$(*& ISP's use a slash in the user name... 291 280 sed -e "s&^USER=.*&USER='$U'&" \ -
scripts/adsl-start.in
diff -ruN rp-pppoe-3.5-orig/scripts/adsl-start.in rp-pppoe-3.5-4/scripts/adsl-start.in
old new 18 18 # Usage: adsl-start [config_file] 19 19 # adsl-start interface user [config_file] 20 20 # Second form overrides USER and ETH from config file. 21 # If config_file is omitted, defaults to /etc/ppp /pppoe.conf21 # If config_file is omitted, defaults to /etc/pppoe.conf 22 22 # 23 23 #*********************************************************************** 24 24 … … 36 36 export LANG 37 37 38 38 # Defaults 39 CONFIG=/etc/ppp /pppoe.conf39 CONFIG=/etc/pppoe.conf 40 40 USER="" 41 41 ETH="" 42 42 ME=`basename $0` 43 # Must be root 44 if [ "`@ID@ -u`" != 0 ] ; then 45 $ECHO "$ME: You must be root to run this script" >& 2 46 exit 1 47 fi 43 44 #TTY_S="tty -s" 45 TTY_S=/bin/true 48 46 49 47 # Debugging 50 48 if [ "$DEBUG" = "1" ] ; then … … 139 137 fi 140 138 # Delete bogus PIDFILE 141 139 rm -f "$PIDFILE" "$PIDFILE.pppd" "$PIDFILE.pppoe" "$PIDFILE.start" 140 else 141 mkdir -p /var/run 142 142 fi 143 143 144 144 echo $$ > $PIDFILE.start … … 169 169 # Looks like the interface came up 170 170 if [ $? = 0 ] ; then 171 171 # Print newline if standard input is a TTY 172 tty -s&& $ECHO " Connected!"172 $TTY_S && $ECHO " Connected!" 173 173 exit 0 174 174 fi 175 175 176 176 if test -n "$FORCEPING" ; then 177 177 $ECHO -n "$FORCEPING" 178 178 else 179 tty -s&& $ECHO -n "$PING"179 $TTY_S && $ECHO -n "$PING" 180 180 fi 181 181 sleep $CONNECT_POLL 182 182 TIME=`expr $TIME + $CONNECT_POLL` -
scripts/adsl-status
diff -ruN rp-pppoe-3.5-orig/scripts/adsl-status rp-pppoe-3.5-4/scripts/adsl-status
old new 15 15 # LIC: GPL 16 16 # 17 17 # Usage: adsl-status [config_file] 18 # If config_file is omitted, defaults to /etc/ppp /pppoe.conf18 # If config_file is omitted, defaults to /etc/pppoe.conf 19 19 # 20 20 #*********************************************************************** 21 21 22 22 # Defaults 23 CONFIG=/etc/ppp /pppoe.conf23 CONFIG=/etc/pppoe.conf 24 24 25 25 case "$#" in 26 26 1) … … 58 58 59 59 PPPD_PID=`cat "$PPPD_PIDFILE"` 60 60 61 # Sigh. Some versions of pppd put PID files in /var/run; others put them 62 # in /etc/ppp. Since it's too messy to figure out what pppd does, we 63 # try both locations. 64 for i in /etc/ppp/ppp*.pid /var/run/ppp*.pid ; do 61 for i in /var/run/ppp*.pid ; do 65 62 if [ -r $i ] ; then 66 63 PID=`cat $i` 67 64 if [ "$PID" = "$PPPD_PID" ] ; then -
scripts/adsl-stop.in
diff -ruN rp-pppoe-3.5-orig/scripts/adsl-stop.in rp-pppoe-3.5-4/scripts/adsl-stop.in
old new 16 16 # LIC: GPL 17 17 # 18 18 # Usage: adsl-stop [config_file] 19 # If config_file is omitted, defaults to /etc/ppp /pppoe.conf19 # If config_file is omitted, defaults to /etc/pppoe.conf 20 20 # 21 21 #*********************************************************************** 22 22 … … 28 28 LOGGER="/usr/bin/logger -t $ME" 29 29 CONFIG="$1" 30 30 if [ "$CONFIG" = "" ] ; then 31 CONFIG=/etc/ppp /pppoe.conf31 CONFIG=/etc/pppoe.conf 32 32 fi 33 33 34 34 if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
Note:
See TracBrowser
for help on using the repository browser.
