diff options
author | Andreas Brodmann <andreas.brodmann@gmail.com> | 2007-11-12 16:22:54 +0000 |
---|---|---|
committer | Andreas Brodmann <andreas.brodmann@gmail.com> | 2007-11-12 16:22:54 +0000 |
commit | a5145638e7e9d2d846c5c8dc9cf089435a9f6f1f (patch) | |
tree | 1d69c328868351b524c169426787eb72248ecfd6 | |
parent | 9f186b02cb10036f234a965bfca6080186217c50 (diff) | |
download | acf-dhcp-a5145638e7e9d2d846c5c8dc9cf089435a9f6f1f.tar.bz2 acf-dhcp-a5145638e7e9d2d846c5c8dc9cf089435a9f6f1f.tar.xz |
fixed stdout/stderr redirection for popen / daemon control
git-svn-id: svn://svn.alpinelinux.org/acf/dhcp/trunk@299 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r-- | dhcp-home-html.lsp | 2 | ||||
-rw-r--r-- | dhcp-model.lua | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/dhcp-home-html.lsp b/dhcp-home-html.lsp index e864c07..7a45b42 100644 --- a/dhcp-home-html.lsp +++ b/dhcp-home-html.lsp @@ -16,7 +16,7 @@ </tr> </form> </table> -<pre><? io.write( form.info.srvctrl.value ) ?></pre><br> +<pre style="color: #ff2020"><? io.write( form.info.srvctrl.value ) ?></pre><br> <h2>DHCPd - Generate Configuration File</h2> <table> diff --git a/dhcp-model.lua b/dhcp-model.lua index 544f1b4..ca02a08 100644 --- a/dhcp-model.lua +++ b/dhcp-model.lua @@ -272,9 +272,9 @@ service_control = function ( command ) local retval = "" local line = "" - local file = io.popen( "/etc/init.d/dhcpd " .. command ) + local file = io.popen( "/etc/init.d/dhcpd " .. command .. " 2>&1" ) if file ~= nil then - line = file:read( "*a" ) + line = file:read( "*l" ) while line ~= nil do retval = retval .. "\n" .. line line = file:read( "*l" ) |