aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-xsysconfig/network-scripts/ifdown-post15
-rwxr-xr-xsysconfig/network-scripts/ifup-post8
-rwxr-xr-xsysconfig/network-scripts/ifup-ppp8
-rw-r--r--sysconfig/network-scripts/network-functions12
4 files changed, 21 insertions, 22 deletions
diff --git a/sysconfig/network-scripts/ifdown-post b/sysconfig/network-scripts/ifdown-post
index bf1c0c18..5df3f564 100755
--- a/sysconfig/network-scripts/ifdown-post
+++ b/sysconfig/network-scripts/ifdown-post
@@ -4,18 +4,11 @@
cd /etc/sysconfig/network-scripts
-# These are currently unused.
-# CONFIG=$1
-# . network-functions
-# source_config
+CONFIG=$1
+. network-functions
+source_config
# Notify programs that have requested notification
-( cd /var/run/netreport || exit
- for i in * ; do
- [ -f $i ] && \
- kill -SIGIO $i >/dev/null 2>&1 || \
- rm -f $i >/dev/null 2>&1
- done
-)
+do_netreport
exit 0
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post
index dd1f8389..6a57d866 100755
--- a/sysconfig/network-scripts/ifup-post
+++ b/sysconfig/network-scripts/ifup-post
@@ -35,12 +35,6 @@ if [ `hostname` = '(none)' -o `hostname` = localhost -a ${DEVICE} != lo ]; then
fi
# Notify programs that have requested notification
-( cd /var/run/netreport || exit
- for i in * ; do
- [ -f $i ] && \
- kill -SIGIO $i >/dev/null 2>&1 || \
- rm -f $i >/dev/null 2>&1
- done
-)
+do_netreport
exit 0
diff --git a/sysconfig/network-scripts/ifup-ppp b/sysconfig/network-scripts/ifup-ppp
index 9f57d838..ecdeae97 100755
--- a/sysconfig/network-scripts/ifup-ppp
+++ b/sysconfig/network-scripts/ifup-ppp
@@ -66,8 +66,9 @@ fi
if [ -n "${PAPNAME}" ] ; then
opts="$opts name ${PAPNAME}"
fi
-if [ -n "${DEBUG}" ] ; then
+if [ "${DEBUG}" = yes ] ; then
opts="$opts debug"
+ chatdbg="-v"
fi
CHATSCRIPT=/etc/sysconfig/network-scripts/chat-$DEVNAME
@@ -83,7 +84,7 @@ while : ; do
/usr/sbin/pppd -detach $opts $MODEMPORT $LINESPEED \
remotename $DEVICE ipparam $DEVICE \
${PPPOPTIONS} \
- connect "/usr/sbin/chat ${DEBUG:+-v} -f $CHATSCRIPT"
+ connect "/usr/sbin/chat $chatdbg -f $CHATSCRIPT"
# exit if we're not supposed to persist or our lock file has disappeared
if [ "$PERSIST" != "yes" -o ! -f /var/run/ppp-$DEVICE.dev ]; then
@@ -93,8 +94,6 @@ while : ; do
size=`wc -c < /var/run/ppp-$DEVICE.dev`
- rm -f /var/run/ppp-$DEVICE.dev
-
if [ $size = 0 ]; then
# pppd never connected
timeout=$RETRYTIMEOUT
@@ -109,6 +108,7 @@ while : ; do
sleep $timeout || {
# sleep was killed
+ rm -f /var/run/ppp-$DEVICE.dev
exit 0
}
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index c45c8467..7e5947c5 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -16,3 +16,15 @@ source_config ()
. $PARENTCONFIG
fi
}
+
+do_netreport ()
+{
+ # Notify programs that have requested notification
+ ( cd /var/run/netreport || exit
+ for i in * ; do
+ [ -f $i ] && \
+ kill -SIGIO $i >/dev/null 2>&1 || \
+ rm -f $i >/dev/null 2>&1
+ done
+ )
+}