summaryrefslogtreecommitdiffstats
path: root/dhcp-model.lua
diff options
context:
space:
mode:
authorAndreas Brodmann <andreas.brodmann@gmail.com>2007-11-12 16:22:54 +0000
committerAndreas Brodmann <andreas.brodmann@gmail.com>2007-11-12 16:22:54 +0000
commita5145638e7e9d2d846c5c8dc9cf089435a9f6f1f (patch)
tree1d69c328868351b524c169426787eb72248ecfd6 /dhcp-model.lua
parent9f186b02cb10036f234a965bfca6080186217c50 (diff)
downloadacf-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
Diffstat (limited to 'dhcp-model.lua')
-rw-r--r--dhcp-model.lua4
1 files changed, 2 insertions, 2 deletions
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" )