?? adsl-stop
字號:
#!/bin/sh# Generated automatically from adsl-stop.in by configure.#***********************************************************************## adsl-stop## Shell script to bring down an ADSL connection## Copyright (C) 2000 Roaring Penguin Software Inc.## $Id: adsl-stop.in,v 1.4 2001/04/02 13:59:14 dfs Exp $## 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##***********************************************************************# Set to "C" locale so we can parse messages from commandsLANG=Cexport LANGME="`basename $0`"LOGGER="/usr/bin/logger -t $ME"CONFIG="$1"if [ "$CONFIG" = "" ] ; then CONFIG=/tmp/ppp/pppoe.conffiif [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then echo "$ME: Cannot read configuration file '$CONFIG'" >& 2 exit 1fi. $CONFIGPPPOE_PIDFILE="$PIDFILE.pppoe"PPPD_PIDFILE="$PIDFILE.pppd"STARTPID="$PIDFILE.start"# Backward config file compatibilityif test "$DEMAND" = "" ; then DEMAND=nofi# Ignore SIGTERMtrap "" 15# Check for pidfileif [ -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 1fiexit 0
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -