summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdinstall/scripts/wlanconfig
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bsdinstall/scripts/wlanconfig')
-rwxr-xr-xusr.sbin/bsdinstall/scripts/wlanconfig20
1 files changed, 18 insertions, 2 deletions
diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig
index 0a3599c..a1ccaf7 100755
--- a/usr.sbin/bsdinstall/scripts/wlanconfig
+++ b/usr.sbin/bsdinstall/scripts/wlanconfig
@@ -1,6 +1,7 @@
#!/bin/sh
#-
# Copyright (c) 2011 Nathan Whitehorn
+# Copyright (c) 2013 Devin Teske
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -25,6 +26,13 @@
# SUCH DAMAGE.
#
# $FreeBSD$
+#
+############################################################ INCLUDES
+
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+
+############################################################ MAIN
echo -n > $BSDINSTALL_TMPETC/wpa_supplicant.conf
chmod 0600 $BSDINSTALL_TMPETC/wpa_supplicant.conf
@@ -50,7 +58,8 @@ if [ $? -ne 0 -a -z $BSDINSTALL_CONFIGCURRENT ]; then
exit 1
fi
-wpa_cli scan >>$BSDINSTALL_LOG
+output=$( wpa_cli scan 2>&1 )
+f_dprintf "%s" "$output"
dialog --backtitle "FreeBSD Installer" --title "Scanning" --ok-label "Skip" \
--pause "Waiting 5 seconds to scan for wireless networks..." \
9 40 5 || exit 1
@@ -132,6 +141,13 @@ echo "network={
}" >> $BSDINSTALL_TMPETC/wpa_supplicant.conf
# Bring up new network
-test ! -z $BSDINSTALL_CONFIGCURRENT && wpa_cli reconfigure >>$BSDINSTALL_LOG
+if [ "$BSDINSTALL_CONFIGCURRENT" ]; then
+ output=$( wpa_cli reconfigure 2>&1 )
+ f_dprintf "%s" "$output"
+fi
exit 0
+
+################################################################################
+# END
+################################################################################
OpenPOWER on IntegriCloud