2020-09-13 20:15:11 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ "$#" -ne 2 ]; then
|
|
|
|
echo "Usage: connect.sh: <ssid> <psk>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-09-18 12:59:02 +02:00
|
|
|
/bin/echo "ctrl_interface=/var/run/wpa_supplicant" > /etc/wpa_supplicant.conf
|
2020-09-19 14:34:59 +02:00
|
|
|
/usr/sbin/wpa_passphrase "$1" "$2" >> /etc/wpa_supplicant.conf
|
2020-09-17 14:00:05 +02:00
|
|
|
/usr/sbin/wpa_supplicant -B -i client0 -c /etc/wpa_supplicant.conf
|
2020-09-18 12:59:02 +02:00
|
|
|
/sbin/udhcpc -i client0
|