source: freewrt/package/rp-pppoe/patches/rp-pppoe-3.5-scripts-fixes.patch

freewrt_2_0
Last change on this file was 475ad56, checked in by Waldemar Brodkorb <wbx@…>, 20 years ago

add OpenWrt trunk revision 3830.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@1 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
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  
    1818# Usage: adsl-connect [config_file]
    1919#        adsl-connect interface user [config_file]
    2020# Second form overrides USER and ETH from config file.
    21 # If config_file is omitted, defaults to /etc//ppp/pppoe.conf
     21# If config_file is omitted, defaults to /etc/pppoe.conf
    2222#
    2323#***********************************************************************
    2424
     
    3030# Paths to programs
    3131IFCONFIG=/sbin/ifconfig
    3232PPPD=@PPPD@
    33 SETSID=@SETSID@
     33SETSID=
    3434PPPOE=@sbindir@/pppoe
    3535LOGGER="/usr/bin/logger -t `basename $0`"
    3636
     37#MODPROBE=modprobe
     38MODPROBE=insmod
     39
    3740# Set to "C" locale so we can parse messages from commands
    3841LANG=C
    3942export LANG
    4043
    41 # Must be root
    42 if test "`@ID@ -u`" != 0 ; then
    43     echo "$0: You must be root to run this script" >& 2
    44     exit 1
    45 fi
    46 
    4744if test "$SETSID" != "" -a ! -x "$SETSID"; then
    4845    SETSID=""
    4946fi
    5047
    51 CONFIG=/etc//ppp/pppoe.conf
     48CONFIG=/etc/pppoe.conf
    5249USER=""
    5350ETH=""
    5451
     
    117114if test `uname -s` = Linux ; then
    118115    $IFCONFIG $ETH up mtu 1500
    119116    # For 2.4 kernels.  Will fail on 2.2.x, but who cares?
    120     modprobe ppp_generic > /dev/null 2>&1
    121     modprobe ppp_async > /dev/null 2>&1
    122     modprobe ppp_synctty > /dev/null 2>&1
     117    $MODPROBE ppp_generic > /dev/null 2>&1
     118    $MODPROBE ppp_async > /dev/null 2>&1
     119    $MODPROBE ppp_synctty > /dev/null 2>&1
    123120    if test -n "$LINUX_PLUGIN" ; then
    124         modprobe pppox > /dev/null 2>&1
    125         modprobe pppoe > /dev/null 2>&1
     121        $MODPROBE pppox > /dev/null 2>&1
     122        $MODPROBE pppoe > /dev/null 2>&1
    126123    fi
    127124fi
    128125
     
    131128    PPPD_SYNC=sync
    132129        # Increase the chances of it working on Linux...
    133130    if test `uname -s` = Linux ; then
    134         modprobe n_hdlc > /dev/null 2>&1
     131        $MODPROBE n_hdlc > /dev/null 2>&1
    135132    fi
    136133else
    137134    PPPOE_SYNC=""
     
    204201
    205202    # Interface name MUST BE LAST!!
    206203    PLUGIN_OPTS="$PLUGIN_OPTS $ETH"
    207     modprobe pppoe > /dev/null 2>&1
     204    $MODPROBE pppoe > /dev/null 2>&1
    208205fi
    209206
    210207if 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  
    2727LANG=C
    2828export LANG
    2929
    30 CONFIG=/etc/ppp/pppoe.conf
     30CONFIG=/etc/pppoe.conf
    3131
    3232# Protect created files
    3333umask 077
     
    4646$ECHO "properly..."
    4747$ECHO ""
    4848
    49 # Must be root
    50 if [ "`@ID@ -u`" != 0 ] ; then
    51     $ECHO "$0: Sorry, you must be root to run this script"
    52     exit 1
    53 fi
    54 
    5549# Prototype config file must exist
    5650if [ ! -r "$CONFIG" ] ; then
    5751    $ECHO "Oh, dear, I don't see the file '$CONFIG' anywhere.  Please"
     
    280274    fi
    281275fi
    282276
    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
     277VARRUN=/var/run
    289278
    290279# Some #$(*& ISP's use a slash in the user name...
    291280sed -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  
    1818# Usage: adsl-start [config_file]
    1919#        adsl-start interface user [config_file]
    2020# Second form overrides USER and ETH from config file.
    21 # If config_file is omitted, defaults to /etc/ppp/pppoe.conf
     21# If config_file is omitted, defaults to /etc/pppoe.conf
    2222#
    2323#***********************************************************************
    2424
     
    3636export LANG
    3737
    3838# Defaults
    39 CONFIG=/etc/ppp/pppoe.conf
     39CONFIG=/etc/pppoe.conf
    4040USER=""
    4141ETH=""
    4242ME=`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"
     45TTY_S=/bin/true
    4846
    4947# Debugging
    5048if [ "$DEBUG" = "1" ] ; then
     
    139137    fi
    140138    # Delete bogus PIDFILE
    141139    rm -f "$PIDFILE" "$PIDFILE.pppd" "$PIDFILE.pppoe" "$PIDFILE.start"
     140else
     141  mkdir -p /var/run
    142142fi
    143143
    144144echo $$ > $PIDFILE.start
     
    169169    # Looks like the interface came up
    170170    if [ $? = 0 ] ; then
    171171        # Print newline if standard input is a TTY
    172         tty -s && $ECHO " Connected!"
     172        $TTY_S && $ECHO " Connected!"
    173173        exit 0
    174174    fi
    175175
    176176    if test -n "$FORCEPING" ; then
    177177        $ECHO -n "$FORCEPING"
    178178    else
    179         tty -s && $ECHO -n "$PING"
     179        $TTY_S && $ECHO -n "$PING"
    180180    fi
    181181    sleep $CONNECT_POLL
    182182    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  
    1515# LIC: GPL
    1616#
    1717# Usage: adsl-status [config_file]
    18 # If config_file is omitted, defaults to /etc/ppp/pppoe.conf
     18# If config_file is omitted, defaults to /etc/pppoe.conf
    1919#
    2020#***********************************************************************
    2121
    2222# Defaults
    23 CONFIG=/etc/ppp/pppoe.conf
     23CONFIG=/etc/pppoe.conf
    2424
    2525case "$#" in
    2626    1)
     
    5858
    5959PPPD_PID=`cat "$PPPD_PIDFILE"`
    6060
    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
     61for i in /var/run/ppp*.pid ; do
    6562    if [ -r $i ] ; then
    6663        PID=`cat $i`
    6764        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  
    1616# LIC: GPL
    1717#
    1818# Usage: adsl-stop [config_file]
    19 # If config_file is omitted, defaults to /etc/ppp/pppoe.conf
     19# If config_file is omitted, defaults to /etc/pppoe.conf
    2020#
    2121#***********************************************************************
    2222
     
    2828LOGGER="/usr/bin/logger -t $ME"
    2929CONFIG="$1"
    3030if [ "$CONFIG" = "" ] ; then
    31     CONFIG=/etc/ppp/pppoe.conf
     31    CONFIG=/etc/pppoe.conf
    3232fi
    3333
    3434if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
Note: See TracBrowser for help on using the repository browser.