source: projects/initscripts/tags/initscripts-8.91.0/sysconfig/network-scripts/ifdown-sl @ 2576

Revision 2576, 933 bytes checked in by daisuke, 13 years ago (diff)

tagging as initscripts-8.91.0

Line 
1#!/bin/bash
2
3cd /etc/sysconfig/network-scripts
4. /etc/sysconfig/network-scripts/network-functions
5
6CONFIG=$1
7source_config
8
9# signals ifup-sl not to persist
10rm -f /var/run/sl-$DEVICE.dev
11
12PID=`pidof dip-$DEVICE`
13#
14# The proctitle for connected dip daemons is actually "-dip (ipaddr)"
15#       with ipaddr == local on dial-out,  remote on dial-in
16# Grab the PID of connected dial-out daemon.
17#
18if [ -z "$PID" ]; then
19  PID=`pidof -- -dip\ \($IPADDR\)`
20fi
21if [ -z "$PID" ]; then
22  exit 1
23fi
24
25kill $PID > /dev/null 2>&1
26if [ ! -d /proc/$PID ]; then
27  /etc/sysconfig/network-scripts/ifdown-post $1
28  exit 0
29fi
30sleep 2
31if [ ! -d /proc/$PID ]; then
32  /etc/sysconfig/network-scripts/ifdown-post $1
33  exit 0
34fi
35
36kill -KILL $PID > /dev/null 2>&1
37if [ -d /proc/$PID ]; then
38  logger -p daemon.info -t ifdown-ppp "ifdown-ppp unable to kill pppd-$DEVICE" &
39else
40  /etc/sysconfig/network-scripts/ifdown-post $1
41fi
42[ ! -d /proc/$PID ] && exit 0
43
44exit 1
45
Note: See TracBrowser for help on using the repository browser.