aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown-post
diff options
context:
space:
mode:
authorThan Ngo <than@redhat.com>2001-08-29 15:10:09 +0000
committerThan Ngo <than@redhat.com>2001-08-29 15:10:09 +0000
commit633f47836273c3895f52659e7d3eefa38eb8fcda (patch)
treeb12294c0c7144f3f18f0cb2fb216b62b4e89e1cf /sysconfig/network-scripts/ifdown-post
parentb8fd7e66aec3c1dd4c28e6bce7713b99349a4102 (diff)
downloadinitscripts-633f47836273c3895f52659e7d3eefa38eb8fcda.tar
initscripts-633f47836273c3895f52659e7d3eefa38eb8fcda.tar.gz
initscripts-633f47836273c3895f52659e7d3eefa38eb8fcda.tar.bz2
initscripts-633f47836273c3895f52659e7d3eefa38eb8fcda.tar.xz
initscripts-633f47836273c3895f52659e7d3eefa38eb8fcda.zip
- fix ISDN dial on demand bugr6-32
- fix typo bug in network-functions
Diffstat (limited to 'sysconfig/network-scripts/ifdown-post')
-rwxr-xr-xsysconfig/network-scripts/ifdown-post11
1 files changed, 10 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifdown-post b/sysconfig/network-scripts/ifdown-post
index db9d3f53..04d516d5 100755
--- a/sysconfig/network-scripts/ifdown-post
+++ b/sysconfig/network-scripts/ifdown-post
@@ -24,7 +24,16 @@ fi
# Reset the default route if this interface had a special one
if ! check_default_route ; then
- add_default_route ${DEVICE}
+ # ISDN device needs special handling dial on demand
+ if [ "${DEVICETYPE}" = "ippp" -o "${DEVICETYPE}" = "isdn" ] && [ "$DIALMODE" = "auto" ] ; then
+ if [ -z "$GATEWAY" ] ; then
+ /sbin/ip route add default dev ${DEVICE}
+ else
+ /sbin/ip route add default via ${GATEWAY}
+ fi
+ else
+ add_default_route ${DEVICE}
+ fi
fi
# Notify programs that have requested notification