From b437cd58826ebb97ea127febfad6eed7eaa897f3 Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Fri, 25 Jan 2008 07:34:08 +0000 Subject: More bugfixes caused by a missing or empty config-file git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@646 ab2d0c66-481e-0410-8bed-d214d4d58bed --- syslog-config-html.lsp | 12 ++++++++--- syslog-controller.lua | 25 +++++++++++----------- syslog-expert-html.lsp | 56 +++++++++++++++++++++----------------------------- syslog-model.lua | 18 +++++++++++----- 4 files changed, 58 insertions(+), 53 deletions(-) diff --git a/syslog-config-html.lsp b/syslog-config-html.lsp index 6c1d6c3..3b13297 100644 --- a/syslog-config-html.lsp +++ b/syslog-config-html.lsp @@ -90,14 +90,20 @@ +

Save and apply above settings

+
+
Apply settings
+
+
+

MANAGEMENT

Program controll-panel
- - - + + +
diff --git a/syslog-controller.lua b/syslog-controller.lua index 77cd0ab..05ed0d3 100644 --- a/syslog-controller.lua +++ b/syslog-controller.lua @@ -18,23 +18,18 @@ function status(self) end function config(self) --- local srvcmdresult = nil --- local srvcmd = self.clientdata.srvcmd --- if (srvcmd ~= nil) then --- srvcmdresult = self.model:service_control(srvcmd) --- if (srvcmd == "stop") or (srvcmd == "restart") then --- posix.sleep(3) -- Wait for the process to start|stop --- else --- posix.sleep(1) -- Wait for the process to start|stop --- end --- end + + if ( self.clientdata.cmddaemon) then + startstop = self.model:startstop_service( self.clientdata.cmddaemon ) + end + local status = self.model.getstatus() local config, errors = self.model.getconfig() local url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller return { status = status, --- srvcmdresult = srvcmdresult, + startstop = startstop, config = config, errors = errors, url = url, } @@ -42,15 +37,21 @@ end function expert(self) local modifications = self.clientdata.modifications or "" - if ( modifications ~= "") then + if ( self.clientdata.cmdsave) then modifications = self.model:update_filecontent(modifications) end + if ( self.clientdata.cmddaemon) then + startstop = self.model:startstop_service( self.clientdata.cmddaemon ) + end + local status = self.model.getstatus() local url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller return { file = self.model:get_filedetails(), status = status, + startstop = startstop, + clientdata = self.clientdata, url = url, } end diff --git a/syslog-expert-html.lsp b/syslog-expert-html.lsp index 97dd3d5..694ea7c 100644 --- a/syslog-expert-html.lsp +++ b/syslog-expert-html.lsp @@ -3,34 +3,26 @@

SYSTEM INFO

-
Program status
-
-
+
Program status
+
-
-
Program version
-
+
Program version
+

CONFIGURATION

-

Expert config

-

File details

-
File name
-
-
+
File name
+
-
-
File size
-
-
+
File size
+
-
-
Last modified
-
+
Last modified
+

File content

@@ -41,27 +33,25 @@

Save and apply above settings

-
Apply settings
-
+
Apply settings
+

MANAGEMENT

-
Program controll-panel
-
- - - -
-
- - -
-
Previous action result
-
+
Program controll-panel
+
+ + + +
+
+ +
Previous action result
+
+
- 8)) then errors["SYSLOGD_OPTS"]["-l"] = "Log value is out of range. Please select one of the above." -- cgit v1.2.3