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
$(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
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
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
$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