diff options
author | Mika Havela <mika.havela@gmail.com> | 2008-03-28 13:58:14 +0000 |
---|---|---|
committer | Mika Havela <mika.havela@gmail.com> | 2008-03-28 13:58:14 +0000 |
commit | de749eb0ae7f08b1cf7d214f39ea5bbf21fa4485 (patch) | |
tree | cc94e8e239875dcfb43ca7498cb028c6b1422f87 | |
parent | 65405bacfc4055feeae802634455b19046c27414 (diff) | |
download | acf-shorewall-de749eb0ae7f08b1cf7d214f39ea5bbf21fa4485.tar.bz2 acf-shorewall-de749eb0ae7f08b1cf7d214f39ea5bbf21fa4485.tar.xz |
Adding information of autostart sequence.
git-svn-id: svn://svn.alpinelinux.org/acf/shorewall/trunk@861 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r-- | shorewall-check-html.lsp | 2 | ||||
-rw-r--r-- | shorewall-edit-html.lsp | 2 | ||||
-rw-r--r-- | shorewall-expert-html.lsp | 2 | ||||
-rw-r--r-- | shorewall-logfile-html.lsp | 2 | ||||
-rw-r--r-- | shorewall-model.lua | 21 | ||||
-rw-r--r-- | shorewall-status-html.lsp | 2 |
6 files changed, 26 insertions, 5 deletions
diff --git a/shorewall-check-html.lsp b/shorewall-check-html.lsp index 38d788b..3bd8831 100644 --- a/shorewall-check-html.lsp +++ b/shorewall-check-html.lsp @@ -43,7 +43,7 @@ end <H1>SYSTEM INFO</H1> <? local myform = form.status -local tags = { "status", "version", } +local tags = { "status", "version", "autostart", } informationform(myform,tags) ?> diff --git a/shorewall-edit-html.lsp b/shorewall-edit-html.lsp index c5f9e6e..f1f7a75 100644 --- a/shorewall-edit-html.lsp +++ b/shorewall-edit-html.lsp @@ -46,7 +46,7 @@ end <DL> <? local myform = form.status -local tags = { "status", "version", } +local tags = { "status", "version", "autostart", } informationform(myform,tags) ?> </DL> diff --git a/shorewall-expert-html.lsp b/shorewall-expert-html.lsp index 8b16c9a..0f7126c 100644 --- a/shorewall-expert-html.lsp +++ b/shorewall-expert-html.lsp @@ -30,7 +30,7 @@ end <H1>SYSTEM INFO</H1> <? local myform = form.status -local tags = { "status", "version", } +local tags = { "status", "version", "autostart", } informationform(myform,tags) ?> diff --git a/shorewall-logfile-html.lsp b/shorewall-logfile-html.lsp index e7d32b2..04fc548 100644 --- a/shorewall-logfile-html.lsp +++ b/shorewall-logfile-html.lsp @@ -50,7 +50,7 @@ end <H1>SYSTEM INFO</H1> <? local myform = form.status -local tags = { "status", "version", } +local tags = { "status", "version", "autostart", } informationform(myform,tags) ?> diff --git a/shorewall-model.lua b/shorewall-model.lua index 8f39bdc..b12533d 100644 --- a/shorewall-model.lua +++ b/shorewall-model.lua @@ -195,6 +195,20 @@ local function addremove_config( addremove, file, value, orgvalue ) end --]] +local function autostarts() + local cmd_output_result, cmd_output_error + local cmd = "/sbin/rc_status | egrep '^S' | egrep '" .. processname .."' 2>/dev/null" + local f = io.popen( cmd ) + local cmdresult = f:read("*a") + if (cmdresult) and (#cmdresult > 0) then + cmd_output_result = "Process will autostart at next boot (at sequence '" .. string.match(cmdresult,"^%a+(%d%d)") .. "')" + else + cmd_output_error = "Not programmed to autostart" + end + f:close() + return cmd_output_result,cmd_output_error +end + -- ################################################################################ -- PUBLIC FUNCTIONS @@ -276,6 +290,13 @@ function getstatus() value=programstate, }) + local autostart_sequense, autostart_errtxt = autostarts() + status.autostart = cfe({ name="autostart", + label="Autostart sequence", + value=autostart_sequense, + errtxt=autostart_errtxt, + }) + return status end diff --git a/shorewall-status-html.lsp b/shorewall-status-html.lsp index 2dc6a2c..e6cbd0d 100644 --- a/shorewall-status-html.lsp +++ b/shorewall-status-html.lsp @@ -23,7 +23,7 @@ end <H1>SYSTEM INFO</H1> <? local myform = form.status -local tags = { "status", "version", } +local tags = { "status", "version", "autostart", } informationform(myform,tags) ?> |