Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > by-pkgid > e3ecb9da391f941dd48c7791939f545c > files > 5

rp-pppoe-3.3-2mdk.i586.rpm

#!/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.

# Source function library if it exists
test -r /etc/rc.d/init.d/functions && . /etc/rc.d/init.d/functions

# From AUTOCONF
prefix=/usr
exec_prefix=/usr

# Paths to programs
START=/usr/sbin/adsl-start
STOP=/usr/sbin/adsl-stop
STATUS=/usr/sbin/adsl-status
case "$1" in
    start)
        gprintf "Bringing up ADSL link"

	$START
	if [ $? = 0 ] ; then
		touch /var/lock/subsys/adsl
	        echo_success
	else
		echo_failure
	fi
        echo ""
        ;;

    stop)
        gprintf "Shutting down ADSL link"

	$STOP > /dev/null 2>&1
	if [ $? = 0 ] ; then
		rm -f /var/lock/subsys/adsl
	        echo_success
	else
		echo_failure
	fi
        echo ""
        ;;

    restart)
	$0 stop
	$0 start
	;;

    status)
	$STATUS
	;;

    *)
        gprintf "Usage: adsl {start|stop|restart|status}\n"
        exit 1
esac

exit 0