summaryrefslogtreecommitdiff
path: root/start-network
diff options
context:
space:
mode:
Diffstat (limited to 'start-network')
-rwxr-xr-xstart-network14
1 files changed, 14 insertions, 0 deletions
diff --git a/start-network b/start-network
new file mode 100755
index 0000000..9b9212f
--- /dev/null
+++ b/start-network
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+INTERFACE="$1"
+
+# Set interface up
+/sbin/ip link set $INTERFACE up
+
+# Launch wpa_supplicant in daemon mode
+/sbin/wpa_supplicant -B -D nl80211,wext \
+ -c/etc/wpa_supplicant/wpasupplicant.conf\
+ -i$INTERFACE -ddd
+
+# Get the IP from router
+/sbin/dhclient $INTERFACE