]> git.pld-linux.org Git - projects/rc-scripts.git/blame - sysconfig/network-scripts/ifdown-sl
fixed colors
[projects/rc-scripts.git] / sysconfig / network-scripts / ifdown-sl
CommitLineData
6955eb97 1#!/bin/sh
7742e157
AF
2PATH=/sbin:/usr/sbin:/bin:/usr/bin
3
4cd /etc/sysconfig/network-scripts
7e04fe0e 5. /etc/rc.d/init.d/functions.network
7742e157
AF
6
7CONFIG=$1
7742e157
AF
8source_config
9
10# signals ifup-sl not to persist
11rm -f /var/run/sl-$DEVICE.dev
12
13PID=`pidof dip-$DEVICE`
12de71be 14#
15# The proctitle for connected dip daemons is actually "-dip (ipaddr)"
16# with ipaddr == local on dial-out, remote on dial-in
17# Grab the PID of connected dial-out daemon.
18#
19if [ -z "$PID" ]; then
20 PID=`pidof -- -dip\ \($IPADDR\)`
21fi
7742e157
AF
22if [ -z "$PID" ]; then
23 exit 1
24fi
25
26kill $PID > /dev/null 2>&1
27if [ ! -d /proc/$PID ]; then
28 /etc/sysconfig/network-scripts/ifdown-post $1
29 exit 0
30fi
31sleep 2
32if [ ! -d /proc/$PID ]; then
33 /etc/sysconfig/network-scripts/ifdown-post $1
34 exit 0
35fi
36
37kill -KILL $PID > /dev/null 2>&1
38if [ -d /proc/$PID ]; then
39 logger -p daemon.info -t ifdown-ppp "ifdown-ppp unable to kill pppd-$DEVICE" &
40else
41 /etc/sysconfig/network-scripts/ifdown-post $1
42fi
43
44exit 1
45
This page took 0.028104 seconds and 4 git commands to generate.