| Revision 1108,
904 bytes
checked in by daisuke, 16 years ago
(diff) |
|
import initscripts-8.90.6 from internal cvs repository
|
| Line | |
|---|
| 1 | #!/bin/bash |
|---|
| 2 | |
|---|
| 3 | cd /etc/sysconfig/network-scripts |
|---|
| 4 | . ./network-functions |
|---|
| 5 | |
|---|
| 6 | CONFIG=$1 |
|---|
| 7 | source_config |
|---|
| 8 | |
|---|
| 9 | # signals ifup-sl not to persist |
|---|
| 10 | rm -f /var/run/sl-$DEVICE.dev |
|---|
| 11 | |
|---|
| 12 | PID=`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 | # |
|---|
| 18 | if [ -z "$PID" ]; then |
|---|
| 19 | PID=`pidof -- -dip\ \($IPADDR\)` |
|---|
| 20 | fi |
|---|
| 21 | if [ -z "$PID" ]; then |
|---|
| 22 | exit 1 |
|---|
| 23 | fi |
|---|
| 24 | |
|---|
| 25 | kill $PID > /dev/null 2>&1 |
|---|
| 26 | if [ ! -d /proc/$PID ]; then |
|---|
| 27 | /etc/sysconfig/network-scripts/ifdown-post $1 |
|---|
| 28 | exit 0 |
|---|
| 29 | fi |
|---|
| 30 | sleep 2 |
|---|
| 31 | if [ ! -d /proc/$PID ]; then |
|---|
| 32 | /etc/sysconfig/network-scripts/ifdown-post $1 |
|---|
| 33 | exit 0 |
|---|
| 34 | fi |
|---|
| 35 | |
|---|
| 36 | kill -KILL $PID > /dev/null 2>&1 |
|---|
| 37 | if [ -d /proc/$PID ]; then |
|---|
| 38 | logger -p daemon.info -t ifdown-ppp "ifdown-ppp unable to kill pppd-$DEVICE" & |
|---|
| 39 | else |
|---|
| 40 | /etc/sysconfig/network-scripts/ifdown-post $1 |
|---|
| 41 | fi |
|---|
| 42 | [ ! -d /proc/$PID ] && exit 0 |
|---|
| 43 | |
|---|
| 44 | exit 1 |
|---|
| 45 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.