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