diff --git a/hnetd/Makefile b/hnetd/Makefile index dbeb586..896d848 100644 --- a/hnetd/Makefile +++ b/hnetd/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hnetd -PKG_SOURCE_VERSION:=b5a03142135c9ab2680027d1fd8c149d2c46e74b -PKG_VERSION:=2015-08-18-$(PKG_SOURCE_VERSION) +PKG_SOURCE_VERSION:=345fb74504249cee5d02b2349ccaaef118523118 +PKG_VERSION:=2015-08-21-$(PKG_SOURCE_VERSION) PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git @@ -121,6 +121,7 @@ define Package/hnetd-$(BUILD_VARIANT)/install $(INSTALL_DIR) $(1)/etc/uci-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)/openwrt/autowifi.script $(1)/usr/sbin/autowifi endef define Package/hnet-full/install diff --git a/hnetd/files/hnet.config b/hnetd/files/hnet.config index 6ac396f..aba765f 100644 --- a/hnetd/files/hnet.config +++ b/hnetd/files/hnet.config @@ -18,3 +18,11 @@ config pa pa config sd sd # option router_name openwrt # 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 diff --git a/hnetd/files/hnetd.init b/hnetd/files/hnetd.init index c4419ee..742de48 100644 --- a/hnetd/files/hnetd.init +++ b/hnetd/files/hnetd.init @@ -15,6 +15,7 @@ OHP_BINARY=/usr/sbin/ohybridproxy PCP_SCRIPT=/usr/sbin/hnetd-pcp-script PCP_BINARY=/usr/sbin/minimalist-pcproxy MULTICAST_SCRIPT=/usr/sbin/hnet-multicast +WIFI_SCRIPT=/usr/sbin/autowifi start_service() { . /lib/functions.sh @@ -45,6 +46,17 @@ start_service() { $MULTICAST_SCRIPT status && procd_append_param command -M "$MULTICAST_SCRIPT" 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 if [ -f $PCP_BINARY -a -f $PCP_SCRIPT ] then