Pejman Moghadam / Slackware

Slackware 12.2 - Sysvinit Support / using pppoe client as an example

Public domain


PPPOE Startup Script

# mkdir /etc/rc.d/init.d/
# vi /etc/rc.d/init.d/pppoe

    case "$1" in
            start)
                    echo -n "Bringing up PPPoE link : /usr/sbin/pppoe-start"
                    /usr/sbin/pppoe-start
                    echo ""
                    ;;

            stop)
                    echo -n "Shutting down PPPoE link : /usr/sbin/pppoe-stop"
                    /usr/sbin/pppoe-stop > /dev/null
                    echo ""
                    ;;

            restart)
                    $0 stop
                    sleep 5
                    $0 start
                    ;;

            status)
                    /usr/sbin/pppoe-status
                    echo ""
                    ;;

            *)
                    echo "Usage: pppoe {start|stop|restart|status}"
    esac

# mkdir /etc/rc.d/rc3.d/
# ln -s /etc/rc.d/rc3.d/ /etc/rc.d/rc4.d
# ln -s /etc/rc.d/init.d/pppoe /etc/rc.d/rc3.d/S05-pppoe
# ln -s /etc/rc.d/init.d/pppoe /etc/rc.d/rc3.d/K05-pppoe

BY: Pejman Moghadam
TAG: pppoe-client, sysvinit
DATE: 2009-04-25 00:17:44


Pejman Moghadam / Slackware [ TXT ]