4 PATH=/sbin:/usr/sbin:/bin:/usr/bin
6 . /etc/sysconfig/network
7 . /etc/rc.d/init.d/functions
8 . /lib/rc-scripts/functions.network
13 # set all major variables
16 # signals ifup-sl not to persist
17 rm -f /var/run/sl-$DEVICE.dev
19 # we can use dip or direct slip connection via slattach
20 if is_no "$DIRECT_CONNECT"; then
21 PID=$(pidof dip-$DEVICE)
25 if grep -q "$MODEMPORT" /proc/$x/cmdline; then
26 logger -p daemon.info -t ifdown-sl \
27 "signal TERM send to \"$(ps -o cmd= $x)\" - this should be slattach"
34 # The proctitle for connected dip daemons is actually "-dip (ipaddr)"
35 # with ipaddr = local on dial-out, remote on dial-in
36 # Grab the PID of connected dial-out daemon.
38 if [ -z "$PID" ]; then
39 PID=$(pidof -- -dip\ \($IPADDR\))
41 if [ -z "$PID" ]; then
45 kill $PID > /dev/null 2>&1
46 if [ ! -d /proc/$PID ]; then
47 /lib/rc-scripts/ifdown-post $1
51 if [ ! -d /proc/$PID ]; then
52 /lib/rc-scripts/ifdown-post $1
56 kill -KILL $PID > /dev/null 2>&1
57 if [ -d /proc/$PID ]; then
58 logger -p daemon.info -t ifdown-sl "ifdown-sl unable to kill sl-$DEVICE" &
60 /lib/rc-scripts/ifdown-post $1