initial version of scripts, config and debian package
[moebian] / install / etc / network / if-post-down.d / zz_static_ip_if_down
diff --git a/install/etc/network/if-post-down.d/zz_static_ip_if_down b/install/etc/network/if-post-down.d/zz_static_ip_if_down
new file mode 100755 (executable)
index 0000000..847b4e9
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Copyright (C) 2009 Nokia Corporation. All rights reserved.
+# A workaround to take down interface when it's configured with a static IP (NB#138487).
+
+set -e
+
+if [ "$MODE" != stop ]; then
+    exit 0
+fi
+
+if [ "$ICD_CONNECTION_TYPE" != WLAN_INFRA -a "$ICD_CONNECTION_TYPE" != WLAN_ADHOC ]; then
+    exit 0
+fi
+
+ifconfig $IFACE down
+
+exit 0