[yast-commit] r50719 - in /trunk/support: agents/ agents/Makefile.am agents/supportconfig.scr src/Support.ycp src/dialogs.ycp
Author: mzugec
Date: Fri Sep 5 10:33:12 2008
New Revision: 50719
URL: http://svn.opensuse.org/viewcvs/yast?rev=50719&view=rev
Log:
added agent
Added:
trunk/support/agents/
trunk/support/agents/Makefile.am
trunk/support/agents/supportconfig.scr
Modified:
trunk/support/src/Support.ycp
trunk/support/src/dialogs.ycp
Added: trunk/support/agents/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/support/agents/Makefile.am?rev=50719&view=auto
==============================================================================
--- trunk/support/agents/Makefile.am (added)
+++ trunk/support/agents/Makefile.am Fri Sep 5 10:33:12 2008
@@ -0,0 +1,7 @@
+# Makefile.am for slp-server/agents
+
+agent_SCRIPTS =
+
+scrconf_DATA = supportconfig.scr
+
+EXTRA_DIST = $(agent_SCRIPTS) $(scrconf_DATA)
Added: trunk/support/agents/supportconfig.scr
URL: http://svn.opensuse.org/viewcvs/yast/trunk/support/agents/supportconfig.scr?rev=50719&view=auto
==============================================================================
--- trunk/support/agents/supportconfig.scr (added)
+++ trunk/support/agents/supportconfig.scr Fri Sep 5 10:33:12 2008
@@ -0,0 +1,50 @@
+/*
+ * Read(.slp.Compression)
+ * (["yes"])
+ *
+ * Write(.slp.Compression, "no")
+ * (true)
+ *
+ * Fore more information about possible keys and values
+ * consult with the slp_config man pages `man slp_config`.
+ */
+
+.etc.supportconfig
+
+`ag_ini(
+ `IniAgent( "/etc/supportconfig.conf",
+ $[
+ "options" : [ "global_values", "comments_last", "line_can_continue", "join_multiline" ],
+ "comments": [
+ "^[ \t]*$", // empty line
+ "^[ \t]+[;#].*$", // comment char is not first char
+ "^[#][ \t]*$", // only comment chars
+ "^[#][ \t]*\\[[^]]*$", // comment chars followed by '[' without matching ']'
+ "^[#][^ \t[]", // comment char followed by non-blank nor '['
+ "^[#][ \t]+[^[a-z \t].*$", // comment chars followed by non a-z char nor '[' nor blank
+ "^[#][ \t]+[a-z ]*[a-z][ \t]*$", // comment chars followed by a-z or blank chars
+ "^[#][ \t]+[a-z ]*[a-z][ \t]*[^a-z \t=].*$", // like above, but followed by non a-z nor blank nor '=' chars
+ ],
+/*
+ "sections" : [
+ $[
+ "begin" : [ "^[ \t]*\\[[ \t]*(.*[^ \t])[ \t]*\\][ \t]*", "[%s]" ],
+ ], $[
+ // this is a special type for commenting out the values
+ "begin" : [ "^[#;][ \t]*\\[[ \t]*(.*[^ \t])[ \t]*\\][ \t]*", "# [%s]" ],
+ ]
+ ],
+*/
+ // we need to exclude ; because of the second matching rule
+ "params" : [
+ // Options with one value ('yes' / 'no')
+// $[ "match" : [ "^[#;][ \t]*([^ \t]+)[ \t]+([^ \t]+)[ \t]+$", "%s %s" ]],
+// $[ "match" : [ "^[#;][ \t]*([^ \t\=]+)[ \t\=]?(.+)[ \t]*$", "; %s %s" ]],
+ // Options with more possible values
+ $[ "match" : [ "^[ \t]*([^ \t\=]+)[ \t\=]+[ ]*\"(.*)\"[ \t]*$", "%s=\"%s\"" ]],
+ $[ "match" : [ "^[ \t]*([^ \t\=]+)[ \t\=]+[ ]*(.+)[ \t]*$", "%s=%s" ]],
+ ],
+ ]
+ )
+)
+
Modified: trunk/support/src/Support.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/support/src/Support.ycp?rev=50719&r1=50718&r2=50719&view=diff
==============================================================================
--- trunk/support/src/Support.ycp (original)
+++ trunk/support/src/Support.ycp Fri Sep 5 10:33:12 2008
@@ -122,7 +122,7 @@
AbortFunction = function;
}
-// content of /etc/support.conf
+// content of /etc/supportconfig.conf
map configuration = $[];
// options parsed from configuration map
@@ -208,7 +208,7 @@
// read database
if(Abort()) return false;
Progress::NextStage();
- configuration = (map)SCR::Read(.etc.support.all);
+ configuration = (map)SCR::Read(.etc.supportconfig.all);
foreach(map
participants (1)
-
mzugec@svn.opensuse.org