]>
Commit | Line | Data |
---|---|---|
7742e157 AF |
1 | #!/bin/bash |
2 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | |
3 | ||
4 | cd /etc/sysconfig/network-scripts | |
12de71be | 5 | . network-functions |
7742e157 AF |
6 | |
7 | CONFIG=$1 | |
7742e157 AF |
8 | source_config |
9 | ||
10 | # signals ifup-sl not to persist | |
11 | rm -f /var/run/sl-$DEVICE.dev | |
12 | ||
13 | PID=`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 | # | |
19 | if [ -z "$PID" ]; then | |
20 | PID=`pidof -- -dip\ \($IPADDR\)` | |
21 | fi | |
7742e157 AF |
22 | if [ -z "$PID" ]; then |
23 | exit 1 | |
24 | fi | |
25 | ||
26 | kill $PID > /dev/null 2>&1 | |
27 | if [ ! -d /proc/$PID ]; then | |
28 | /etc/sysconfig/network-scripts/ifdown-post $1 | |
29 | exit 0 | |
30 | fi | |
31 | sleep 2 | |
32 | if [ ! -d /proc/$PID ]; then | |
33 | /etc/sysconfig/network-scripts/ifdown-post $1 | |
34 | exit 0 | |
35 | fi | |
36 | ||
37 | kill -KILL $PID > /dev/null 2>&1 | |
38 | if [ -d /proc/$PID ]; then | |
39 | logger -p daemon.info -t ifdown-ppp "ifdown-ppp unable to kill pppd-$DEVICE" & | |
40 | else | |
41 | /etc/sysconfig/network-scripts/ifdown-post $1 | |
42 | fi | |
43 | ||
44 | exit 1 | |
45 |