aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsysconfig/network-scripts/ifdown5
-rwxr-xr-xsysconfig/network-scripts/ifup4
2 files changed, 9 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index 5042c28c..60b778c7 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -52,6 +52,11 @@ while ! check_device_down && [ "$waited" -lt 50 ] ; do
waited=$(($waited+1))
done
+# don't leave an outdated key sitting around
+if [ -n "${WIRELESS_ENC_KEY}" -a -x /sbin/iwconfig ]; then
+ /sbin/iwconfig ${DEVICE} enc 0
+fi
+
if [ "$retcode" = 0 ] ; then
/etc/sysconfig/network-scripts/ifdown-post $CONFIG
# do NOT use $? because ifdown should return whether or not
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 42ddf17c..701a2282 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -46,6 +46,10 @@ else
ISALIAS=no
fi
+if [ -n "${WIRELESS_ENC_KEY}" -a -x /sbin/iwconfig ]; then
+ iwconfig ${DEVICE} enc ${WIRELESS_ENC_KEY}
+fi
+
# Old BOOTP variable
if [ "${BOOTP}" = "yes" ]; then
BOOTPROTO=bootp