mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2024-12-22 11:03:48 +01:00
add proper init script setup; various small fixes.
This commit is contained in:
parent
7778bdd6e2
commit
88e3205347
14
Makefile
14
Makefile
@ -14,9 +14,9 @@ IncludeWithNewlines = $(subst
|
|||||||
|
|
||||||
|
|
||||||
# Name and release number of this package
|
# Name and release number of this package
|
||||||
PKG_NAME:=wifibox
|
PKG_NAME := wifibox
|
||||||
PKG_VERSION:=0.1.0
|
PKG_VERSION := 0.1.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE := 3
|
||||||
|
|
||||||
# This specifies the directory where we're going to build the program.
|
# This specifies the directory where we're going to build the program.
|
||||||
# The root build directory, $(BUILD_DIR), is by default the build_mipsel
|
# The root build directory, $(BUILD_DIR), is by default the build_mipsel
|
||||||
@ -82,7 +82,7 @@ define Package/wifibox/install
|
|||||||
# $(INSTALL_DIR) $(1)/usr/share/lua/autowifi/ext
|
# $(INSTALL_DIR) $(1)/usr/share/lua/autowifi/ext
|
||||||
# $(INSTALL_DIR) $(1)/usr/share/lua/autowifi/ext/www
|
# $(INSTALL_DIR) $(1)/usr/share/lua/autowifi/ext/www
|
||||||
$(INSTALL_DIR) $(1)/usr/share/lua/autowifi/ext/www/cgi-bin
|
$(INSTALL_DIR) $(1)/usr/share/lua/autowifi/ext/www/cgi-bin
|
||||||
$(INSTALL_DIR) $(1)/etc/rc.d
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
$(INSTALL_DIR) $(1)/www/cgi-bin
|
$(INSTALL_DIR) $(1)/www/cgi-bin
|
||||||
|
|
||||||
### create all files in /usr/share/lua/autowifi (autowifi)
|
### create all files in /usr/share/lua/autowifi (autowifi)
|
||||||
@ -109,7 +109,7 @@ endif
|
|||||||
|
|
||||||
$(LN) -s /usr/share/lua/autowifi/ext/wfcf $(1)/www/cgi-bin
|
$(LN) -s /usr/share/lua/autowifi/ext/wfcf $(1)/www/cgi-bin
|
||||||
$(LN) -s /usr/share/lua/autowifi/admin $(1)/www
|
$(LN) -s /usr/share/lua/autowifi/admin $(1)/www
|
||||||
$(LN) -s /usr/share/lua/autowifi/ext/autowifi_init $(1)/etc/rc.d/S18autowifi_init
|
$(LN) -s /usr/share/lua/autowifi/ext/autowifi_init $(1)/etc/init.d/autowifi_init
|
||||||
|
|
||||||
### install gpx utility
|
### install gpx utility
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
@ -120,6 +120,10 @@ define Package/wifibox/postinst
|
|||||||
$(call IncludeWithNewlines,post-install.sh)
|
$(call IncludeWithNewlines,post-install.sh)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/wifibox/prerm
|
||||||
|
$(call IncludeWithNewlines,pre-remove.sh)
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/wifibox/postrm
|
define Package/wifibox/postrm
|
||||||
$(call IncludeWithNewlines,post-remove.sh)
|
$(call IncludeWithNewlines,post-remove.sh)
|
||||||
endef
|
endef
|
||||||
|
11
TODO
11
TODO
@ -1,19 +1,14 @@
|
|||||||
# TODO
|
# TODO
|
||||||
- do things right and copy (not link) the init script to init.d
|
|
||||||
(and enable it automatically, which links to it from rc.d with the proper start priority?)
|
|
||||||
as sudo does: '[ -n "$$IPKG_INSTROOT" ] || { /etc/init.d/sudo enable}'; and here: https://forum.openwrt.org/viewtopic.php?pid=85197#p85197
|
|
||||||
- add more config options to package; candidates:
|
- add more config options to package; candidates:
|
||||||
reconf.WWW_RENAME_NAME, wifihelper.{AP_ADDRESS, AP_NETMASK, (NET)}
|
reconf.WWW_RENAME_NAME, wifihelper.{AP_ADDRESS, AP_NETMASK, (NET)}
|
||||||
about bridging this to lua: have some Makefile stage create a ini/lua file with k/v's and have lua read out that file?
|
about bridging this to lua: have some Makefile stage create a ini/lua file with k/v's and have lua read out that file?
|
||||||
- write a shellscript to automate tasks like swapping out /www and packaging modified code for git merging
|
- write a shellscript to automate tasks like swapping out /www and packaging modified code for git merging
|
||||||
- add dependency on either wr703n or mr3020 (and probably comment it out to avoid being to conservative...)
|
|
||||||
- see if updating works when a new version is 'released' (probably needs a real feed)
|
- see if updating works when a new version is 'released' (probably needs a real feed)
|
||||||
- add aliases to root profile only when debugging was requested in menuconfig
|
- add aliases to root profile only when debugging was requested in menuconfig
|
||||||
- symlinks created in the install section of the Makefile should perhaps be created in the postinstall script,
|
|
||||||
this way the package is truly relocatable
|
|
||||||
- add config option to compile sources using luac?
|
- add config option to compile sources using luac?
|
||||||
|
- add dependency on either wr703n or mr3020 (and probably comment it out to avoid being to conservative...)
|
||||||
- add/link general OpenWrt build instructions for OSX to installation page on wiki.
|
- add/link general OpenWrt build instructions for OSX to installation page on wiki.
|
||||||
- remove usr/share/lua/autowifi and subdirectories (if empty) in postrm
|
- relocatabilty of package (take root prefix into consideration everywhere)
|
||||||
|
|
||||||
|
|
||||||
# TODO for autowifi.js
|
# TODO for autowifi.js
|
||||||
@ -47,7 +42,7 @@ Check http://geon.github.io/Programming/2012/04/25/ascii-art-signatures-in-the-w
|
|||||||
....D o o d l e 3 D
|
....D o o d l e 3 D
|
||||||
...________ _____ _____ v 1.0.1
|
...________ _____ _____ v 1.0.1
|
||||||
../ / / |__ / __/ / - /___ __
|
../ / / |__ / __/ / - /___ __
|
||||||
./ ' ' /--// _|-// --| . /v /
|
./ ' ' /--// _|-// - | . /v /
|
||||||
/________/__//__/__//____/___/_^_\
|
/________/__//__/__//____/___/_^_\
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ if [ ! -f /etc/banner.default ]; then
|
|||||||
.......________ _____ _____ v $(PACKAGE_VERSION)
|
.......________ _____ _____ v $(PACKAGE_VERSION)
|
||||||
....../ / / |__ / __/ / - /___ __
|
....../ / / |__ / __/ / - /___ __
|
||||||
...../ / / /--// _|-// --| . /v /
|
...../ / / /--// _|-// --| . /v /
|
||||||
..../________/__//__/__//____/___/_^_\\
|
..../________/__//__/__//____/___/_^_\
|
||||||
...
|
...
|
||||||
..A cad in a box.
|
..A cad in a box.
|
||||||
.
|
.
|
||||||
@ -68,3 +68,7 @@ addFirewallNet
|
|||||||
|
|
||||||
echo "Adding network interface 'wlan'..."
|
echo "Adding network interface 'wlan'..."
|
||||||
uci set network.wlan=interface; uci commit network; /etc/init.d/network reload
|
uci set network.wlan=interface; uci commit network; /etc/init.d/network reload
|
||||||
|
|
||||||
|
[ -z "$$IPKG_INSTROOT" ] || { /etc/init.d/autowifi_init enable; }
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
@ -18,3 +18,5 @@ rmdir /www/cgi-bin
|
|||||||
echo "The wifibox banner has been removed. Changes to the root profile however, have"
|
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."
|
echo "not been reverted, as haven't the wlan firewall zone and the radio0 device state."
|
||||||
echo "NOTE: config changes have not been implemented yet."
|
echo "NOTE: config changes have not been implemented yet."
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
5
pre-remove.sh
Normal file
5
pre-remove.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ -z "$$IPKG_INSTROOT" ] || { /etc/init.d/autowifi_init disable; }
|
||||||
|
|
||||||
|
exit 0
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
START=19
|
START=18
|
||||||
LOGGER="logger -s -t autowifi -p 6"
|
LOGGER="logger -s -t autowifi -p 6"
|
||||||
|
|
||||||
boot() {
|
boot() {
|
||||||
|
Loading…
Reference in New Issue
Block a user