aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2012-02-01 12:34:54 -0500
committerBill Nottingham <notting@redhat.com>2012-03-09 13:07:58 -0500
commit21e133232e52d7ceef156f99eaec93accca51ab7 (patch)
tree8c3de3da69a7e36249415453834764b425f56b4b
parent7d499942e89c4fac826300ba0d240dc7d459df3a (diff)
downloadinitscripts-21e133232e52d7ceef156f99eaec93accca51ab7.tar
initscripts-21e133232e52d7ceef156f99eaec93accca51ab7.tar.gz
initscripts-21e133232e52d7ceef156f99eaec93accca51ab7.tar.bz2
initscripts-21e133232e52d7ceef156f99eaec93accca51ab7.tar.xz
initscripts-21e133232e52d7ceef156f99eaec93accca51ab7.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