summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/rp-pppoe/scripts/adsl-stop.in
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2002-08-22 15:26:01 +0000
committerMystery Man <unknown@mandriva.org>2002-08-22 15:26:01 +0000
commitadd076e220fdffdeb6de5ae9a9efb6c7e3e0303e (patch)
tree956c3d91d4b8cfc7851ad7e02301fe5e6db1aa66 /mdk-stage1/rp-pppoe/scripts/adsl-stop.in
parent76761ff24d3358147c214490defbab4910201d73 (diff)
downloaddrakx-backup-do-not-use-add076e220fdffdeb6de5ae9a9efb6c7e3e0303e.tar
drakx-backup-do-not-use-add076e220fdffdeb6de5ae9a9efb6c7e3e0303e.tar.gz
drakx-backup-do-not-use-add076e220fdffdeb6de5ae9a9efb6c7e3e0303e.tar.bz2
drakx-backup-do-not-use-add076e220fdffdeb6de5ae9a9efb6c7e3e0303e.tar.xz
drakx-backup-do-not-use-add076e220fdffdeb6de5ae9a9efb6c7e3e0303e.zip
This commit was manufactured by cvs2svn to create tag 'V1_1_9_16mdk'.V1_1_9_16mdk
Diffstat (limited to 'mdk-stage1/rp-pppoe/scripts/adsl-stop.in')
-rwxr-xr-xmdk-stage1/rp-pppoe/scripts/adsl-stop.in84
1 files changed, 0 insertions, 84 deletions
diff --git a/mdk-stage1/rp-pppoe/scripts/adsl-stop.in b/mdk-stage1/rp-pppoe/scripts/adsl-stop.in
deleted file mode 100755
index af0867573..000000000
--- a/mdk-stage1/rp-pppoe/scripts/adsl-stop.in
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/sh
-# @configure_input@
-#***********************************************************************
-#
-# adsl-stop
-#
-# Shell script to bring down an ADSL connection
-#
-# Copyright (C) 2000 Roaring Penguin Software Inc.
-#
-# $Id$
-#
-# This file may be distributed under the terms of the GNU General
-# Public License.
-#
-# Usage: adsl-stop [config_file]
-# If config_file is omitted, defaults to /etc/ppp/pppoe.conf
-#
-#***********************************************************************
-
-ME="`basename $0`"
-LOGGER="/usr/bin/logger -t $ME"
-CONFIG="$1"
-if [ "$CONFIG" = "" ] ; then
- CONFIG=/etc/ppp/pppoe.conf
-fi
-
-if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
- echo "$ME: Cannot read configuration file '$CONFIG'" >& 2
- exit 1
-fi
-
-. $CONFIG
-
-PPPOE_PIDFILE="$PIDFILE.pppoe"
-PPPD_PIDFILE="$PIDFILE.pppd"
-STARTPID="$PIDFILE.start"
-
-# Backward config file compatibility
-if test "$DEMAND" = "" ; then
- DEMAND=no
-fi
-
-# Ignore SIGTERM
-trap "" 15
-
-# Check for pidfile
-if [ -r "$PIDFILE" ] ; then
- PID=`cat $PIDFILE`
-
- # Check if still running
- kill -0 $PID > /dev/null 2>&1
- if [ $? != 0 ] ; then
- echo "$ME: The adsl-connect script (PID $PID) appears to have died" >& 2
- fi
-
- # Kill pppd, which should in turn kill pppoe
- if [ -r "$PPPD_PIDFILE" ] ; then
- PPPD_PID=`cat "$PPPD_PIDFILE"`
- $LOGGER -p daemon.notice "Killing pppd"
- echo "Killing pppd ($PPPD_PID)"
- kill $PPPD_PID > /dev/null 2>&1 || exit 1
- fi
-
- # Kill adsl-start
- PIDS=`cat $STARTPID`
- kill -0 $PIDS > /dev/null 2>&1
- if [ $? = 0 ] ; then
- $LOGGER -p daemon.notice "Killing adsl-connect"
- kill $PIDS > /dev/null 2>&1
- fi
-
- # Kill adsl-connect
- $LOGGER -p daemon.notice "Killing adsl-connect"
- echo "Killing adsl-connect ($PID)"
- kill $PID > /dev/null 2>&1
-
- rm -f "$PIDFILE" "$PPPD_PIDFILE" "$PPPOE_PIDFILE" "$STARTPID"
-else
- echo "$ME: No ADSL connection appears to be running" >&2
- exit 1
-fi
-
-exit 0