Install loglite filter to wifibox.

Small fixes to loglite filter.
Set dummy host/port/agent info on command-line API call.
Remove non-functional version info from shell banner.
New todo item in release script.

Conflicts:
	extra/scripts/publish-wifibox-release.lua
This commit is contained in:
Wouter R 2014-05-19 21:39:59 +02:00
parent 52c9435534
commit 759c0a3007
6 changed files with 18 additions and 8 deletions

View File

@ -88,6 +88,7 @@ define Package/wifibox/install
#$(INSTALL_DIR) $(1)/etc
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/root/
#$(INSTALL_DIR) $(1)/www
$(INSTALL_DIR) $(1)/www/cgi-bin
@ -102,6 +103,9 @@ define Package/wifibox/install
$(INSTALL_BIN) $(WIFIBOX_BASE_DIR)/script/d3d-updater.lua $(1)/$(TGT_LUA_DIR_SUFFIX)/script
$(LN) -s /$(TGT_LUA_DIR_SUFFIX)/script/d3d-updater.lua $(1)/bin/d3d-updater
$(CP) $(WIFIBOX_BASE_DIR)/script/loglite-filters.lua $(1)/root/
$(INSTALL_BIN) $(WIFIBOX_BASE_DIR)/script/loglite.lua $(1)/$(TGT_LUA_DIR_SUFFIX)/script
$(LN) -s /$(TGT_LUA_DIR_SUFFIX)/script/loglite.lua $(1)/bin/loglite
$(INSTALL_BIN) $(WIFIBOX_BASE_DIR)/script/wifibox_init $(1)/etc/init.d/wifibox
$(INSTALL_BIN) $(WIFIBOX_BASE_DIR)/script/dhcpcheck_init $(1)/etc/init.d/dhcpcheck
$(INSTALL_BIN) $(WIFIBOX_BASE_DIR)/script/d3dapi $(1)/$(TGT_LUA_DIR_SUFFIX)/script

View File

@ -27,8 +27,8 @@
-- HostName ftp.greenhost.nl
-- Some basic sanity checks are built in (unique version, updated release notes, 'clean' openwrt config)
-- but lots others are still missing (mainly: clean git repo's, freshly built images).
-- The script must be run from within the openwrt build root. So it's handy to create a symlink
-- to this file. You could to something like from the build root:
-- The script must be run from within the openwrt build root. So it's handy to create a symlink
-- to this file. You could to something like from the build root:
-- ln -s ~/wrt-wifibox-feed/doodle3d-firmware/extra/scripts/publish-wifibox-release.lua .
-- Then you can start with:
-- cd trunk ../publish-wifibox-release.lua

View File

@ -38,7 +38,7 @@ if [ ! -f $IPKG_INSTROOT/etc/banner.default ]; then
mv $IPKG_INSTROOT/etc/banner $IPKG_INSTROOT/etc/banner.default
cat <<-'EOM' > $IPKG_INSTROOT/etc/banner
........D o o d l e 3 D
.......________ _____ _____ v \$(PACKAGE_VERSION)
.......________ _____ _____
....../ / / |__ / __/ / - /___ __
...../ / / /--// _|-// --| . /v /
..../________/__//__/__//____/___/_^_\

View File

@ -181,6 +181,10 @@ function M.new(environment, postData, debugEnabled)
self.remoteAddress = environment['REMOTE_ADDR']
else
self.requestMethod = 'CMDLINE'
self.remoteHost = "cmdline"
self.remotePort = "0"
self.userAgent = "shell"
self.remoteAddress = "0.0.0.0"
end
self.cmdLineArgs = kvTableFromArray(arg)

View File

@ -10,7 +10,7 @@ M.printstart = {
M.test = {
['options'] = { 'delete_mode' },
['patterns'] = {
['(verbose)'] = 'underline,cyan,_delete'
['(verbose)'] = 'underline,cyan,_delete',
['(info)'] = 'magenta',
['ABSD'] = '_nodelete',
['SE?RV?'] = 'bblue'

View File

@ -1,3 +1,5 @@
#!/usr/bin/env lua
-- Notes
-- * directives: either a color, a color prefixed by 'b' or one of: _delete, _nodelete, [_matchonly]
-- * pattern rules are matched top to bottom, the last one encountered overriding any previous conflicting directive
@ -50,9 +52,9 @@ local DFL_FILTERSET_FILE = "loglite-filters.lua"
local DEFAULT_FILTERSET = {
['options'] = { 'default_enabled', 'keep_mode' },
['patterns'] = {
['(error)'] = 'red',
['(warning)'] = 'yellow',
['(bulk)'] = 'gray'
['%(error%)'] = 'red',
['%(warning%)'] = 'yellow',
['%(bulk%)'] = 'gray'
}
}
@ -174,7 +176,7 @@ local function main()
local tailin = followFile and io.popen('tail -f ' .. followFile, 'r') or io.stdin
local patterns = DEFAULT_FILTERSET.patterns
local options = { ['mode'] = 'keep', count = 'all' }
local options = { ['mode'] = 'keep', count = 'none' }
pcall(tailStream, tailin, patterns, options) -- Note: protected call to suppress interrupt error thrown by lines iterator
end