summaryrefslogtreecommitdiffstats
path: root/config-db
diff options
context:
space:
mode:
authorOliver Tappe2008-05-20 15:26:55 +0200
committerOliver Tappe2008-05-20 15:26:55 +0200
commitbeab72fc0ec3a6d857f4c64e3d08dcbf9c457c61 (patch)
treebef314bb7d5ac0e9a65748fbece3b7686523f48f /config-db
parent* more work at desktop plugin (GDM & KDM should now work on SUSE & Ubuntu) (diff)
downloadcore-beab72fc0ec3a6d857f4c64e3d08dcbf9c457c61.tar.gz
core-beab72fc0ec3a6d857f4c64e3d08dcbf9c457c61.tar.xz
core-beab72fc0ec3a6d857f4c64e3d08dcbf9c457c61.zip
* added support to slxconfig for checking the given attribute values against
their respective regex, an appropriate complaint is shown if the value doesn't match git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1778 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db')
-rwxr-xr-xconfig-db/slxconfig7
1 files changed, 7 insertions, 0 deletions
diff --git a/config-db/slxconfig b/config-db/slxconfig
index cd3b3ec2..c8c05093 100755
--- a/config-db/slxconfig
+++ b/config-db/slxconfig
@@ -39,6 +39,7 @@ use OpenSLX::AttributeRoster;
use OpenSLX::Basics;
use OpenSLX::ConfigDB;
use OpenSLX::ConfigFolder;
+use OpenSLX::OSPlugin::Roster;
use OpenSLX::Utils;
my %option;
@@ -247,6 +248,12 @@ sub parseKeyValueArgsWithAttrs
if (grep { $_ eq $key } @$allowedKeys) {
$dataHash{$key} = $value;
} elsif (grep { $_ eq $key } @$allowedAttrKeys) {
+ $key =~ m{^(.+)::.+?$};
+ my $pluginName = $1;
+ my $plugin
+ = OpenSLX::OSPlugin::Roster->getPlugin($pluginName)
+ || die _tr('unable to load plugin "%s"', $pluginName);
+ $plugin->checkValueForKey($key, $value);
$attrHash{$key} = $value;
} else {
die _tr("unknown key '%s' specified for %s\n", $key, $table);