hnetd: Adding wifi autoconf PoC
This commit is contained in:
parent
cad0d08ade
commit
314186661d
3 changed files with 23 additions and 2 deletions
|
@ -7,8 +7,8 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=hnetd
|
PKG_NAME:=hnetd
|
||||||
PKG_SOURCE_VERSION:=b5a03142135c9ab2680027d1fd8c149d2c46e74b
|
PKG_SOURCE_VERSION:=345fb74504249cee5d02b2349ccaaef118523118
|
||||||
PKG_VERSION:=2015-08-18-$(PKG_SOURCE_VERSION)
|
PKG_VERSION:=2015-08-21-$(PKG_SOURCE_VERSION)
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
|
@ -121,6 +121,7 @@ define Package/hnetd-$(BUILD_VARIANT)/install
|
||||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||||
$(INSTALL_BIN) ./files/hnetd.defaults $(1)/etc/uci-defaults/x-hnetd.defaults
|
$(INSTALL_BIN) ./files/hnetd.defaults $(1)/etc/uci-defaults/x-hnetd.defaults
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/generic/multicast.script $(1)/usr/sbin/hnet-multicast
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/generic/multicast.script $(1)/usr/sbin/hnet-multicast
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/autowifi.script $(1)/usr/sbin/autowifi
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/hnet-full/install
|
define Package/hnet-full/install
|
||||||
|
|
|
@ -18,3 +18,11 @@ config pa pa
|
||||||
config sd sd
|
config sd sd
|
||||||
# option router_name openwrt
|
# option router_name openwrt
|
||||||
# option domain_name home.
|
# option domain_name home.
|
||||||
|
|
||||||
|
|
||||||
|
# Wifi allows for very basic wifi autoconfiguration
|
||||||
|
# Warning: This feature is unstable
|
||||||
|
config wifi wifi
|
||||||
|
# option enable 0
|
||||||
|
# option ssid ssidtest
|
||||||
|
# option password test
|
||||||
|
|
|
@ -15,6 +15,7 @@ OHP_BINARY=/usr/sbin/ohybridproxy
|
||||||
PCP_SCRIPT=/usr/sbin/hnetd-pcp-script
|
PCP_SCRIPT=/usr/sbin/hnetd-pcp-script
|
||||||
PCP_BINARY=/usr/sbin/minimalist-pcproxy
|
PCP_BINARY=/usr/sbin/minimalist-pcproxy
|
||||||
MULTICAST_SCRIPT=/usr/sbin/hnet-multicast
|
MULTICAST_SCRIPT=/usr/sbin/hnet-multicast
|
||||||
|
WIFI_SCRIPT=/usr/sbin/autowifi
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
|
@ -45,6 +46,17 @@ start_service() {
|
||||||
$MULTICAST_SCRIPT status && procd_append_param command -M "$MULTICAST_SCRIPT"
|
$MULTICAST_SCRIPT status && procd_append_param command -M "$MULTICAST_SCRIPT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
config_get enableval wifi enable
|
||||||
|
if [ -f "$WIFI_SCRIPT" -a "$enableval" = "1" ]; then
|
||||||
|
wifiopt=$WIFI_SCRIPT
|
||||||
|
config_get ssidval wifi ssid
|
||||||
|
config_get passval wifi password
|
||||||
|
if [ -n "$ssidval" -a -n "$passval" ]; then
|
||||||
|
wifiopt=${wifiopt},${ssidval}:${passval}
|
||||||
|
fi
|
||||||
|
procd_append_param command -w "$wifiopt"
|
||||||
|
fi
|
||||||
|
|
||||||
# Enable PCP, if it's present
|
# Enable PCP, if it's present
|
||||||
if [ -f $PCP_BINARY -a -f $PCP_SCRIPT ]
|
if [ -f $PCP_BINARY -a -f $PCP_SCRIPT ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue