RPi3/RPi2 detect.

pull/335/head^2
Christopher Young 2016-03-15 00:27:47 -04:00
rodzic fae350408f
commit c96ee7bce4
2 zmienionych plików z 15 dodań i 2 usunięć

Wyświetl plik

@ -13,10 +13,24 @@
# Authenticator
### END INIT INFO
# Detect RPi version.
# Per http://elinux.org/RPi_HardwareHistory
DAEMON_CONF=/etc/hostapd/hostapd.conf
RPI_REV=`cat /proc/cpuinfo | grep 'Revision' | awk '{print $3}' | sed 's/^1000//'`
if [ "$RPI_REV" -eq "a01041" ] || [ "$RPI_REV" -eq "a21041" ] ; then
# This is a RPi2B.
DAEMON_CONF=/etc/hostapd/hostapd.conf
fi
if [ "$RPI_REV" -eq "a01041" ] ; then
# This is a RPi3B.
DAEMON_CONF=/etc/hostapd/hostapd-rpi3.conf
fi
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON_SBIN=/usr/sbin/hostapd
DAEMON_DEFS=/etc/default/hostapd
DAEMON_CONF=
NAME=hostapd
DESC="advanced IEEE 802.11 management"
PIDFILE=/run/hostapd.pid

Wyświetl plik

@ -1,5 +1,4 @@
interface=wlan0
driver=rtl871xdrv
ssid=stratux
hw_mode=g
channel=1