summaryrefslogtreecommitdiffstats
path: root/config-db/slxconfig
diff options
context:
space:
mode:
authorOliver Tappe2008-06-02 23:29:34 +0200
committerOliver Tappe2008-06-02 23:29:34 +0200
commit93c45317cb2bcaf69b3f71b5fa42c191d16b79cf (patch)
treea4435f529118744d8d4bcec1e503b771743da9e9 /config-db/slxconfig
parentfixed problem reported by Michael: (diff)
downloadcore-93c45317cb2bcaf69b3f71b5fa42c191d16b79cf.tar.gz
core-93c45317cb2bcaf69b3f71b5fa42c191d16b79cf.tar.xz
core-93c45317cb2bcaf69b3f71b5fa42c191d16b79cf.zip
* separated synchronization of attributes from removal of stale references,
as the are in fact two separate concepts (and are invoked from different contexts) * added cleanup-db command to slxconfig which can be used to get rid of references to unknown attributes and/or plugins git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1836 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/slxconfig')
-rwxr-xr-xconfig-db/slxconfig18
1 files changed, 18 insertions, 0 deletions
diff --git a/config-db/slxconfig b/config-db/slxconfig
index 02029a81..3d9eba0a 100755
--- a/config-db/slxconfig
+++ b/config-db/slxconfig
@@ -98,6 +98,9 @@ elsif ($action =~ m[^change-s]i) {
elsif ($action =~ m[^change-c]i) {
changeClientInConfigDB(@ARGV);
}
+elsif ($action =~ m[^cleanup-db]i) {
+ cleanupConfigDB(@ARGV);
+}
elsif ($action =~ m[^list-a]) {
print @ARGV
? _tr("List of known attributes for scope '%s':\n", $ARGV[0])
@@ -164,6 +167,7 @@ else {
change-group
change-system
change-vendor-os
+ cleanup-db
list-attributes
list-client
list-export
@@ -292,6 +296,11 @@ sub checkGivenStage3Attrs
return 1;
}
+sub cleanupConfigDB
+{
+ return $openslxDB->cleanupAnyInconsistencies();
+}
+
sub mergeNonExistingAttributes
{
my $target = shift;
@@ -1489,6 +1498,15 @@ changes the data of an existing system in the config-DB
Note: you can use the special value '-' to unset a key (mostly useful
for attributes).
+=item B<< cleanup-db >>
+
+utility command that looks for any inconsistencies in the DB (stale references
+and/or references to plugins that do not exists) and removes them.
+
+You should only invoke this if you are a developer and have removed one or
+more plugins from the repository and would like to get rid of the left-overs
+in your local DB.
+
=item B<< list-attributes [<attr-scope>] >>
lists all attributes or the one with the given name