0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-11-17 11:07:56 +01:00

Change package-directory script to include ultifi package; several fixes to package installation; rename wifibox init script.

This commit is contained in:
Wouter R 2013-07-26 01:12:00 +02:00
parent 781c3f9ff1
commit 596799472c
6 changed files with 16 additions and 9 deletions

View File

@ -32,7 +32,7 @@ define Package/wifibox
# DEFAULT:=y
TITLE:=Doodle3D WifiBox firmware
URL:=http://www.doodle3d.com/wifibox
DEPENDS:=+lua +libuci-lua +libiwinfo-lua +uhttpd +kmod-usb-acm +kmod-usb-serial-ftdi
DEPENDS:=+lua +libuci-lua +libiwinfo-lua +uhttpd +kmod-usb-acm +kmod-usb-serial-ftdi +ultifi
endef
define Package/wifibox/description
@ -91,14 +91,15 @@ define Package/wifibox/install
### create all files in /usr/share/lua/autowifi (autowifi)
$(CP) $(WIFIBOX_BASE_DIR)/opkg.conf $(1)/$(TGT_LUA_DIR_SUFFIX)/
$(CP) $(WIFIBOX_BASE_DIR)/*.lua $(1)/$(TGT_LUA_DIR_SUFFIX)/
$(CP) $(WIFIBOX_BASE_DIR)/network/*.lua $(1)/$(TGT_LUA_DIR_SUFFIX)/network/
$(CP) $(WIFIBOX_BASE_DIR)/rest/*.lua $(1)/$(TGT_LUA_DIR_SUFFIX)/rest/
$(CP) $(WIFIBOX_BASE_DIR)/rest/api/*.lua $(1)/$(TGT_LUA_DIR_SUFFIX)/rest/api/
$(CP) $(WIFIBOX_BASE_DIR)/util/*.lua $(1)/$(TGT_LUA_DIR_SUFFIX)/util/
$(CP) $(WIFIBOX_BASE_DIR)/script/wifibox_init $(1)/$(TGT_LUA_DIR_SUFFIX)/script
$(CP) $(WIFIBOX_BASE_DIR)/script/d3dapi $(1)/$(TGT_LUA_DIR_SUFFIX)/script
$(INSTALL_BIN) $(WIFIBOX_BASE_DIR)/script/wifibox_init $(1)/$(TGT_LUA_DIR_SUFFIX)/script
$(INSTALL_BIN) $(WIFIBOX_BASE_DIR)/script/d3dapi $(1)/$(TGT_LUA_DIR_SUFFIX)/script
# $(CP) $(WIFIBOX_BASE_DIR)/www/* $(1)/$(TGT_LUA_DIR_SUFFIX)/www/
$(CP) $(WIFIBOX_BASE_DIR)/www/* $(1)/www/ #copy www files directly to /www
@ -116,7 +117,7 @@ endif
### create links elsewhere in the system (autowifi)
$(LN) -s /$(TGT_LUA_DIR_SUFFIX)/script/d3dapi $(1)/www/cgi-bin
$(LN) -s /$(TGT_LUA_DIR_SUFFIX)/script/wifibox_init $(1)/etc/init.d/wifibox_init
$(LN) -s /$(TGT_LUA_DIR_SUFFIX)/script/wifibox_init $(1)/etc/init.d/wifibox
### install gpx utility
$(INSTALL_DIR) $(1)/usr/bin

View File

@ -8,13 +8,14 @@ INDEX_FILE=Packages
INDEX_GZ_FILE=Packages.gz
if [ "x$1" == "x-h" ]; then
echo "This script creates a directory with wifibox ipk files found in the openWrt build environment."
echo "This script creates a directory with wifibox and ultifi ipk files found in the openWrt build environment."
echo "If specified, the -z option also compresses the result."
exit
fi
if [ ! -d $PKG_DEST_DIR ]; then mkdir $PKG_DEST_DIR; fi
cp $PKG_SRC_DIR/wifibox*.ipk $PKG_DEST_DIR
cp $PKG_SRC_DIR/ultifi*.ipk $PKG_DEST_DIR
cd $PKG_DEST_DIR
rm -f $INDEX_FILE
rm -f $INDEX_GZ_FILE

View File

@ -49,7 +49,11 @@ EOM
fi
### Add some convenience functionality to root's profile
grep '^# DO NOT MODIFY.*wifibox package.$' /root/.profile >/dev/null 2>&1
ROOT_PROFILE=/root/.profile
if [ ! -f $ROOT_PROFILE ]; then
touch $ROOT_PROFILE
fi
grep '^# DO NOT MODIFY.*wifibox package.$' $ROOT_PROFILE >/dev/null 2>&1
if [ $? -eq 1 ]; then
cat <<-EOM >> /root/.profile
@ -70,9 +74,11 @@ if [ -z "$IPKG_INSTROOT" ]; then
echo "Adding network interface 'wlan'..."
uci set network.wlan=interface; uci commit network; /etc/init.d/network reload
/etc/init.d/wifibox_init enable
/etc/init.d/wifibox enable
else
ADDR_LINE=`cat $IPKG_INSTROOT/etc/config/network | grep ipaddr`
echo "WARNING: WiFiBox network configuration can only be prepared when installing on real device"
echo "network config address line:"
fi
exit 0

View File

@ -12,7 +12,6 @@ rmdir /usr/share/lua/wifibox/script
rmdir /usr/share/lua/wifibox/util
rmdir /usr/share/lua/wifibox
rmdir /usr/share/lua
rm /www/wifibox
echo "The wifibox banner has been removed. Changes to the root profile however, have"
echo "not been reverted, as haven't the wlan firewall zone and the radio0 device state."

View File

@ -1,7 +1,7 @@
#!/bin/sh
if [ -z "$$IPKG_INSTROOT" ]; then
/etc/init.d/wifibox_init disable
/etc/init.d/wifibox disable
fi
exit 0