#!/bin/sh # Start/stop/restart/status the PPPoE link (rp-pppoe) # Written for Slackware Linux by Erik Jan Tromp # paths to programs START=/usr/sbin/pppoe-start STOP=/usr/sbin/pppoe-stop STATUS=/usr/sbin/pppoe-status pppoe_start() { echo "Bringing up PPPoE link: $START" $START } pppoe_stop() { echo "Shutting down PPPoE link: $STOP" $STOP > /dev/null 2>&1 } pppoe_restart() { $0 pppoe_stop sleep 1 $0 pppoe_start } pppoe_status() { $STATUS } case "$1" in 'start') pppoe_start ;; 'stop') pppoe_stop ;; 'restart') pppoe_restart ;; 'status') pppoe_status ;; *) echo "usage: $0 start|stop|restart|status" esac