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
12# Source function library if it exists
13test -r /etc/rc.d/init.d/functions && . /etc/rc.d/init.d/functions
14
15# From AUTOCONF
16prefix=@prefix@
17exec_prefix=@exec_prefix@
18
19# Paths to programs
20START=@sbindir@/adsl-start
21STOP=@sbindir@/adsl-stop
22STATUS=@sbindir@/adsl-status
23case "$1" in
24    start)
25        echo -n "Bringing up ADSL link"
26
27	$START
28	if [ $? = 0 ] ; then
29	        echo_success
30	else
31		echo_failure
32	fi
33        echo ""
34        ;;
35
36    stop)
37        echo -n "Shutting down ADSL link"
38
39	$STOP > /dev/null 2>&1
40	if [ $? = 0 ] ; then
41	        echo_success
42	else
43		echo_failure
44	fi
45        echo ""
46        ;;
47
48    restart)
49	$0 stop
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