Merge pull request #550 from peepsnet/master

FIX Stratux so it works again!!! a.k.a. added stratux-wifi.sh to update scripts and correct pathing issue
pull/553/head
cyoung 2016-12-18 14:45:08 -05:00 zatwierdzone przez GitHub
commit 5aeb10503e
4 zmienionych plików z 48 dodań i 25 usunięć

Wyświetl plik

@ -4,33 +4,52 @@ iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp
iface wlan0 inet static
address 192.168.10.1
netmask 255.255.255.0
post-up /usr/sbin/stratux-wifi.sh
#####################################################################
## Custom settings not for novice users!!!!!!
## Modify at your own risk!!!!!!!!!!!!!!!!!!!
##
## Second Wifi Dongle for local work and internet access
## wifi must be open for these settings to work
## This template is for adding a second wifi dongle to your PI for internet access while debugging
## Modify /etc/wpa_supplicant/wpa_supplicant.conf with your settings also( see below )
##
## uncomment the next two lines to activate the service as well as modify the settings and comments below
#allow-hotplug wlan1
#iface wlan1 inet static
## Uncomment the following lines as needed.
# The SSID you want to connect to
# uncomment the next line and modify if necessary
# wireless-essid 6719
# The address you want to use on your network
# uncomment the next line and modify if necessary
# address 192.168.1.50
# The address of your netmask
# uncomment the next line and modify if necessary
# netmask 255.255.255.0
# The gateway of your router that you are connecting to
# uncomment the next line and modify
# gateway 192.168.1.1
# allow-hotplug wlan1
# iface wlan1 inet manual
# wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
# iface name_of_WPA_Config inet dhcp
# iface name_of_other_WPA_Config inet dhcp
## End of interfaces
#contents of wpa_supplicant.conf
#############################################################
# ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
# update_config=1
# network={
# ssid="SSID_1"
# id_str="name_of_WPA_Config"
# scan_ssid=1
# key_mgmt=WPA-PSK
# psk="mypassword"
# priority=1
# }
# network={
# ssid="SSID_2"
# id_str="name_of_other_WPA_Config"
# scan_ssid=1
# key_mgmt=WPA-PSK
# psk="mypassword"
# priority=3
# }
#############################################################

Wyświetl plik

@ -11,6 +11,9 @@ DAEMON_SBIN=/usr/sbin/hostapd
#User settings for hostapd.conf and hostapd-edimax.conf
DAEMON_USER_PREF=/etc/hostapd/hostapd.user
# Temporary hostapd.conf built by combining
# non-editable /etc/hostapd/hostapd.conf or hostapd-edimax.conf
# and the user configurable /etc/hostapd/hostapd.conf
DAEMON_TMP=/tmp/hostapd.conf
# Detect RPi version.
@ -20,14 +23,11 @@ RPI_REV=`cat /proc/cpuinfo | grep 'Revision' | awk '{print $3}' | sed 's/^1000//
if [ "$RPI_REV" = "a01041" ] || [ "$RPI_REV" = "a21041" ] || [ "$RPI_REV" = "900092" ] || [ "$RPI_REV" = "900093" ] && [ "$EW7811Un" != '' ]; then
# This is a RPi2B or RPi0 with Edimax USB Wifi dongle.
DAEMON_CONF=/etc/hostapd/hostapd-edimax.conf
DAEMON_SBIN=/etc/hostapd/hostapd-edimax
DAEMON_SBIN=/usr/sbin/hostapd-edimax
fi
#Make a new hostapd or hostapd-edimax conf file based on logic above
cp -f ${DAEMON_CONF} ${DAEMON_TMP}
#inject user settings from file to tmp conf
cat ${DAEMON_USER_PREF} >> ${DAEMON_TMP}
cat ${DAEMON_USER_PREF} ${DAEMON_CONF} > ${DAEMON_TMP}
${DAEMON_SBIN} -B ${DAEMON_TMP}

Wyświetl plik

@ -35,6 +35,7 @@ cp image/10-stratux.rules work/bin/
cp image/99-uavionix.rules work/bin/
cp image/motd work/bin/
cp image/fancontrol.py work/bin/
cp image/stratux-wifi.sh work/bin/
#TODO: librtlsdr.
cd work/

Wyświetl plik

@ -23,6 +23,9 @@ ln -fs /lib/systemd/system/stratux.service /etc/systemd/system/multi-user.target
cp -f hostapd.conf /etc/hostapd/hostapd.conf
cp -f hostapd-edimax.conf /etc/hostapd/hostapd-edimax.conf
#WiFi Hostapd ver test and hostapd.conf builder script
cp -f stratux-wifi.sh /usr/sbin/
#WiFi Config Manager
cp -f hostapd_manager.sh /usr/sbin/