projects
/
hvlinux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enlevé alias "su --login" pour demeurer dans le répertoire courant lors de l'éxécutio...
[hvlinux.git]
/
stage2
/
bootscripts
/
ifdown
diff --git
a/stage2/bootscripts/ifdown
b/stage2/bootscripts/ifdown
index
cc0951a
..
a6fabf9
100755
(executable)
--- a/
stage2/bootscripts/ifdown
+++ b/
stage2/bootscripts/ifdown
@@
-23,9
+23,14
@@
check_brctl()
fi
}
fi
}
-if [ "$BOOTPROTO" == "dhcp" ]; then
- # DHCP configuration
+# First make sure interface is available
+if ! ip link show ${DEVICE} 1> /dev/null 2>&1 ; then
+ echo "Interface ${DEVICE} not available"
+ exit ${EXIT_CODE_WARNING}
+fi
+if [ "x${BOOTPROTO}" = "xdhcp" -o "x${BOOTPROTO}" = "xwifi" ]; then
+ # DHCP configuration
# Load DHCP client parameters
source /etc/sysconfig/network/dhcp-client
# Load DHCP client parameters
source /etc/sysconfig/network/dhcp-client
@@
-36,17
+41,21
@@
if [ "$BOOTPROTO" == "dhcp" ]; then
cmd_run_log ${DHCP_PROG} ${DHCP_STOP} ${DEVICE} || exit ${EXIT_CODE_FAILURE}
elif [ x${BOOTPROTO} = "xstatic" ]; then
# Static configuration
cmd_run_log ${DHCP_PROG} ${DHCP_STOP} ${DEVICE} || exit ${EXIT_CODE_FAILURE}
elif [ x${BOOTPROTO} = "xstatic" ]; then
# Static configuration
- cmd_run_log ip addr flush ${DEVICE} &&
- cmd_run_log ip link set ${DEVICE} down || exit ${EXIT_CODE_FAILURE}
+ cmd_run_log ip addr flush ${DEVICE} || exit ${EXIT_CODE_FAILURE}
elif [ x${BOOTPROTO} = "xpppoe" ]; then
# PPPoE configuration
cmd_run_log pppoe-stop
elif [ x${BOOTPROTO} = "xpppoe" ]; then
# PPPoE configuration
cmd_run_log pppoe-stop
- cmd_run_log ip addr flush ${DEVICE} &&
- cmd_run_log ip link set ${DEVICE} down || exit ${EXIT_CODE_FAILURE}
+ cmd_run_log ip addr flush ${DEVICE} || exit ${EXIT_CODE_FAILURE}
else
exit 1
fi
else
exit 1
fi
+if [ "x${BOOTPROTO}" = "xwifi" ]; then
+ killall wpa_supplicant
+fi
+
+cmd_run_log ip link set ${DEVICE} down || exit ${EXIT_CODE_FAILURE}
+
# Determining if the interface is part of a bridge:
if [ -n "${BRIDGE_TO}" ]; then
check_brctl
# Determining if the interface is part of a bridge:
if [ -n "${BRIDGE_TO}" ]; then
check_brctl
@@
-54,7
+63,7
@@
if [ -n "${BRIDGE_TO}" ]; then
fi
# Determining if the interface is a bridge:
fi
# Determining if the interface is a bridge:
-if [ "x${BRIDGE}" =
=
"xyes" ]; then
+if [ "x${BRIDGE}" = "xyes" ]; then
# Check that the brctl program is present and executable.
if [ ! -x ${BRCTL} ]; then
msg_log "*** ERROR: /usr/sbin/brctl not found."
# Check that the brctl program is present and executable.
if [ ! -x ${BRCTL} ]; then
msg_log "*** ERROR: /usr/sbin/brctl not found."