[Zrouter-src] ZRouter.org: push to ZRouter profiles/lua_web_ui/files/etc/www/d...

zrouter-src at zrouter.org zrouter-src at zrouter.org
Thu Oct 11 22:43:48 UTC 2012


details:   http://zrouter.org/hg/zrouter//rev/49a14435cb56
changeset: 477:49a14435cb56
user:      Aleksandr Rybalko <ray at ddteam.net>
date:      Mon Sep 24 14:45:03 2012 +0300
description:
Remove print_to_console.lua, bad way for debugging.

diffstat:

 profiles/lua_web_ui/files/etc/www/devd.lua                 |   1 -
 profiles/lua_web_ui/files/etc/www/httpd.lua                |   1 -
 profiles/lua_web_ui/files/etc/www/lib/print_to_console.lua |  27 --------------
 3 files changed, 0 insertions(+), 29 deletions(-)

diffs (60 lines):

diff -r 51d48b4d40ce -r 49a14435cb56 profiles/lua_web_ui/files/etc/www/devd.lua
--- a/profiles/lua_web_ui/files/etc/www/devd.lua	Mon Sep 24 14:36:20 2012 +0300
+++ b/profiles/lua_web_ui/files/etc/www/devd.lua	Mon Sep 24 14:45:03 2012 +0300
@@ -10,9 +10,6 @@
 serverhost = serverhost or "127.0.0.1";
 serverport = serverport or "80";
 
--- redirect print to /dev/console
--- dofile("lib/print_to_console.lua");
-
 -- redirect print to syslog
 dofile("lib/lsyslog.lua");
 syslog_init("devd.lua");
diff -r 51d48b4d40ce -r 49a14435cb56 profiles/lua_web_ui/files/etc/www/httpd.lua
--- a/profiles/lua_web_ui/files/etc/www/httpd.lua	Mon Sep 24 14:36:20 2012 +0300
+++ b/profiles/lua_web_ui/files/etc/www/httpd.lua	Mon Sep 24 14:45:03 2012 +0300
@@ -55,9 +55,6 @@
 -- HOSTAPD helper
 --dofile("lib/hostapd.lua");
 
--- redirect print to /dev/console
--- dofile("lib/print_to_console.lua");
-
 -- redirect print to syslog
 dofile("lib/lsyslog.lua");
 syslog_init("httpd.lua");
diff -r 51d48b4d40ce -r 49a14435cb56 profiles/lua_web_ui/files/etc/www/lib/print_to_console.lua
--- a/profiles/lua_web_ui/files/etc/www/lib/print_to_console.lua	Mon Sep 24 14:36:20 2012 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-print_native = print;
-cons = io.open("/dev/console", "w");
-
--- XXX We need to find a way how to close it on signal
--- cons:close();
-
--- Write to stdout and console at the same time
-function console(...)
-	ret = 0;
-	out = string.gsub(string.format(...), "\n", "\r\n");
-	if cons then
-		ret = cons:write(out);
-	end
-	-- check if native print moved
-	if print_native then
-		print_native(out);
-	else
-		print(out);
-	end
-	return ret;
-end
-
-function progress(...)
-	console(...);
-end
-
-print = function (...)
-	-- "string.format" need raw string of "print" as a single string
-	console(table.concat(arg, "\t"):gsub("%%","%%%%") .. "\n");
-end


More information about the Zrouter-src mailing list