aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2012-02-01 12:34:54 -0500
committerBill Nottingham <notting@redhat.com>2012-02-01 12:34:54 -0500
commit987cc20e486e5568031f77d04a85e3ca1b732377 (patch)
treefb1787be928f4f21ae6444694a6a6fd58e3012e7
parent2a7f2f455c271d4eef1018601a75e1a87c4eee0b (diff)
downloadinitscripts-987cc20e486e5568031f77d04a85e3ca1b732377.tar
initscripts-987cc20e486e5568031f77d04a85e3ca1b732377.tar.gz
initscripts-987cc20e486e5568031f77d04a85e3ca1b732377.tar.bz2
initscripts-987cc20e486e5568031f77d04a85e3ca1b732377.tar.xz
initscripts-987cc20e486e5568031f77d04a85e3ca1b732377.zip
Allow for ifup-$TYPE/ifdown-$TYPE as well.
This allows extending scripts without having to modifiy the case statement in network-functions each time.
-rwxr-xr-xsysconfig/network-scripts/ifdown4
-rwxr-xr-xsysconfig/network-scripts/ifup4
2 files changed, 8 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index db045da4..f2c13086 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -58,6 +58,10 @@ fi
OTHERSCRIPT="/etc/sysconfig/network-scripts/ifdown-${DEVICETYPE}"
if [ ! -x ${OTHERSCRIPT} ]; then
+ OTHERSCRIPT="/etc/sysconfig/network-scripts/ifdown-${TYPE}"
+fi
+
+if [ ! - x ${OTHERSCRIPT} ]; then
OTHERSCRIPT="/etc/sysconfig/network-scripts/ifdown-eth"
fi
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index f2980b39..62564224 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -139,6 +139,10 @@ fi
OTHERSCRIPT="/etc/sysconfig/network-scripts/ifup-${DEVICETYPE}"
if [ ! -x ${OTHERSCRIPT} ]; then
+ OTHERSCRIPT="/etc/sysconfig/network-scripts/ifup-${TYPE}"
+fi
+
+if [ ! - x ${OTHERSCRIPT} ]; then
OTHERSCRIPT="/etc/sysconfig/network-scripts/ifup-eth"
fi