projects
/
hvlinux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Vérification si interface réseau existe avant de l'activer/désactiver
[hvlinux.git]
/
stage2
/
bootscripts
/
ifdown
diff --git
a/stage2/bootscripts/ifdown
b/stage2/bootscripts/ifdown
index
52a20df
..
115c488
100755
(executable)
--- a/
stage2/bootscripts/ifdown
+++ b/
stage2/bootscripts/ifdown
@@
-23,6
+23,12
@@
check_brctl()
fi
}
+# First make sure interface is available
+if ! ip link show ${DEVICE} ; then
+ echo "Interface ${DEVICE} not available"
+ exit ${EXIT_CODE_WARNING}
+fi
+
if [ "x${BOOTPROTO}" = "xdhcp" ]; then
# DHCP configuration