From a83f38291b0de75d5f92f5cda7a9cabd8518faee Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Thu, 17 Jan 2008 09:38:24 +0000 Subject: Starts showing current config on the config-tab git-svn-id: svn://svn.alpinelinux.org/acf/lbu/trunk@594 ab2d0c66-481e-0410-8bed-d214d4d58bed --- lbu-config-html.lsp | 23 +++++++++++++---------- lbu-controller.lua | 4 +++- lbu-model.lua | 33 ++++++++++++++++++++++++++++++++- 3 files changed, 48 insertions(+), 12 deletions(-) diff --git a/lbu-config-html.lsp b/lbu-config-html.lsp index 24ef5a1..095f6bc 100644 --- a/lbu-config-html.lsp +++ b/lbu-config-html.lsp @@ -18,9 +18,11 @@
Default media for commit
@@ -28,20 +30,21 @@
Password protected commits
-
+
>
Cipher to use at encryption
-
-(For possible ciphers, try: openssl -v)
+
Password when encrypting
-
+
" name="PASSWORD">

Save and apply above settings

@@ -68,7 +71,7 @@ &1", "r") + if not (f) then return ciphers end + for line in f:lines() do + if (watchdog) then + for cipher in string.gmatch(line, "(%S+)") do + table.insert(opensslciphers,tostring(cipher)) + end + end + if (string.match(line, "^Cipher commands")) then watchdog="yes" end + end + f:close() + return opensslciphers +end -- ################################################################################ -- PUBLIC FUNCTIONS @@ -57,6 +75,19 @@ function list(self) return ret end +function getconfig () + local path = configfile + local config = {} + local lbumedias = {} + table.insert(lbumedias, {name="No default", value=""}) + table.insert(lbumedias, {name="floppy", value="floppy"}) + table.insert(lbumedias, {name="usb", value="usb"}) + config = getopts.getoptsfromfile(path) + config["LBU_MEDIA_LIST"]= lbumedias + config["DEFAULT_CIPHER_LIST"]= getciphers() +-- config["debug"] = getciphers() + return config +end -- ################################################################################ -- OLD FUNCTIONS -- cgit v1.2.3