diff options
author | Erik Troan <ewt@redhat.com> | 1997-09-16 14:12:05 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1997-09-16 14:12:05 +0000 |
commit | ced9dffda28f1ec2b060f3e419cf3c6b964b03a1 (patch) | |
tree | da3f56c24861ddc77e2910291c71adc12dca136b /sysconfig/network-scripts/ifup-sl | |
download | initscripts-ced9dffda28f1ec2b060f3e419cf3c6b964b03a1.tar initscripts-ced9dffda28f1ec2b060f3e419cf3c6b964b03a1.tar.gz initscripts-ced9dffda28f1ec2b060f3e419cf3c6b964b03a1.tar.bz2 initscripts-ced9dffda28f1ec2b060f3e419cf3c6b964b03a1.tar.xz initscripts-ced9dffda28f1ec2b060f3e419cf3c6b964b03a1.zip |
Initial revision
Diffstat (limited to 'sysconfig/network-scripts/ifup-sl')
-rwxr-xr-x | sysconfig/network-scripts/ifup-sl | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifup-sl b/sysconfig/network-scripts/ifup-sl new file mode 100755 index 00000000..aad0b051 --- /dev/null +++ b/sysconfig/network-scripts/ifup-sl @@ -0,0 +1,56 @@ +#!/bin/sh +PATH=/sbin:/usr/sbin:/bin:/usr/bin + +# ifup-post can't be done for slip :-( Solution: use PPP + +if [ "$1" != daemon ] ; then + $0 daemon $*& + exit 0 +fi + +shift + +. $1 + +if [ "foo$2" = "fooboot" -a ${ONBOOT} = "no" ] +then + exit +fi + +if [ -z "$RETRYTIMEOUT" ]; then + RETRYTIMEOUT=30 +fi + +[ -x /usr/sbin/dip ] || { + echo "/usr/sbin/dip does not exist or is not executable" + echo "ifup-sl for $DEVICE exiting" + logger -p daemon.info -t ifup-sl \ + "/usr/sbin/dip does not exist or is not executable for $DEVICE" + exit 1 +} + +[ -f /etc/sysconfig/network-scripts/dip-$DEVICE ] || { + echo "/etc/sysconfig/network-scripts/dip-$DEVICE does not exist" + echo "ifup-sl for $DEVICE exiting" + logger -p daemon.info -t ifup-sl \ + "/etc/sysconfig/network-scripts/dip-$DEVICE does not exist for $DEVICE" + exit 1 +} + +while : ; do + echo > /var/run/sl-$DEVICE.dev + (logger -p daemon.info -t ifup-sl \ + "dip started for $DEVICE on $MODEMPORT at $LINESPEED" &)& + doexec /usr/sbin/dip dip-$DEVICE /etc/sysconfig/network-scripts/dip-$DEVICE + if [ "$PERSIST" != "yes" -o ! -f /var/run/sl-$DEVICE.dev ] ; then + exit 0 + fi + rm -f /var/run/sl-$DEVICE.dev + + + sleep $RETRYTIMEOUT || { + # sleep was killed + exit 0 + } +done + |