1#!/bin/sh 2# 3# adsl This script starts or stops an ADSL connection 4# 5# chkconfig: 2345 99 01 6# description: Connects to ADSL provider 7# 8# Copyright (C) 2000 Roaring Penguin Software Inc. This software may 9# be distributed under the terms of the GNU General Public License, version 10# 2 or any later version. 11# Modifed to work with SuSE 6.4 linux by Gary Cameron. 12# 13# Source function library. 14#. /etc/rc.d/init.d/functions # For red hat? 15. /etc/rc.config # For SuSE, enables setting from /etc/rc.config 16 17#Tweak this 18restart_time=120 19 20# From AUTOCONF 21prefix=@prefix@ 22exec_prefix=@exec_prefix@ 23 24# Paths to programs 25START=@sbindir@/adsl-start 26STOP=@sbindir@/adsl-stop 27STATUS=@sbindir@/adsl-status 28 29test "$ADSL_START" = "yes" || exit 0 30 31# The echo return value for success (defined in /etc/rc.config). 32return=$rc_done 33case "$1" in 34 start) 35 echo -n "Bringing up ADSL link" 36 $START > /dev/null 2>&1 || return=$rc_failed 37 echo -e "$return" 38 ;; 39 40 stop) 41 echo -n "Shutting down ADSL link" 42 $STOP > /dev/null 2>&1 || return=$rc_failed 43 echo -e "$return" 44 ;; 45 46 restart) 47 $0 stop 48 echo "Waiting" $restart_time "seconds for the host to reset itself" 49 sleep $restart_time #Note: Need time for host to reset itself 50 $0 start 51 ;; 52 53 status) 54 $STATUS 55 ;; 56 57 *) 58 echo "Usage: adsl {start|stop|restart|status}" 59 exit 1 60esac 61 62exit 0 63