1#!/bin/sh 2# 3# pppoe This script starts or stops a PPPoE connection 4# 5# chkconfig: 2345 99 01 6# description: Connects to PPPoE provider 7# 8# LIC: GPL 9# 10# Copyright (C) 2000 Roaring Penguin Software Inc. This software may 11# be distributed under the terms of the GNU General Public License, version 12# 2 or any later version. 13 14# Source function library if it exists 15test -r /etc/rc.d/init.d/functions && . /etc/rc.d/init.d/functions 16 17# From AUTOCONF 18prefix=@prefix@ 19exec_prefix=@exec_prefix@ 20 21# Paths to programs 22START=@sbindir@/pppoe-start 23STOP=@sbindir@/pppoe-stop 24STATUS=@sbindir@/pppoe-status 25case "$1" in 26 start) 27 echo -n "Bringing up PPPoE link: " 28 29 $START 30 if [ $? = 0 ] ; then 31 echo success 32 touch /var/lock/subsys/pppoe 33 else 34 echo failure 35 fi 36 ;; 37 38 stop) 39 echo -n "Shutting down PPPoE link: " 40 41 $STOP > /dev/null 2>&1 42 if [ $? = 0 ] ; then 43 echo success 44 rm -f /var/lock/subsys/pppoe 45 else 46 echo failure 47 fi 48 ;; 49 50 restart) 51 $0 stop 52 $0 start 53 ;; 54 55 status) 56 $STATUS 57 ;; 58 59 *) 60 echo "Usage: pppoe {start|stop|restart|status}" 61 exit 1 62esac 63 64exit 0 65