summaryrefslogtreecommitdiffstats
path: root/config-db
diff options
context:
space:
mode:
authorOliver Tappe2006-09-30 18:49:01 +0200
committerOliver Tappe2006-09-30 18:49:01 +0200
commitd10c93c8b72d9f1dc198123d72117db023e2d541 (patch)
treeb863da93577faf5304669a34a0248a9d077a1395 /config-db
parentProblem with nbd-client timing fixed in init. Still problem with (diff)
downloadcore-d10c93c8b72d9f1dc198123d72117db023e2d541.tar.gz
core-d10c93c8b72d9f1dc198123d72117db023e2d541.tar.xz
core-d10c93c8b72d9f1dc198123d72117db023e2d541.zip
* ask for confirmation only if database actually has content
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@416 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db')
-rwxr-xr-xconfig-db/setup-test-data-simple.pl14
1 files changed, 9 insertions, 5 deletions
diff --git a/config-db/setup-test-data-simple.pl b/config-db/setup-test-data-simple.pl
index 675b0c5f..b6a68576 100755
--- a/config-db/setup-test-data-simple.pl
+++ b/config-db/setup-test-data-simple.pl
@@ -18,14 +18,18 @@ openslxInit();
my $openslxDB = connectConfigDB();
-if (!$clobber) {
+my @systems = fetchSystemsByFilter($openslxDB);
+my $systemCount = scalar(@systems)-1;
+ # ignore default system
+my @clients = fetchClientsByFilter($openslxDB);
+my $clientCount = scalar(@clients)-1;
+ # ignore default client
+if ($systemCount && $clientCount && !$clobber) {
my $yes = _tr('yes');
my $no = _tr('no');
- my @systems = fetchSystemsByFilter($openslxDB);
- my @clients = fetchClientsByFilter($openslxDB);
print _tr(qq[This will overwrite the current OpenSLX-database with an example dataset.
All your data (%s systems and %s clients) will be lost!
-Do you want to continue(%s/%s)? ], scalar(@systems), scalar(@clients), $yes, $no);
+Do you want to continue(%s/%s)? ], $systemCount, $clientCount, $yes, $no);
my $answer = <>;
if ($answer !~ m[^\s*$yes]i) {
print "no - stopping\n";
@@ -77,7 +81,7 @@ my $system2Id = addSystem($openslxDB, {
'ramfs_nicmods' => '',
'ramfs_fsmods' => '',
'kernel' => "boot/vmlinuz-2.6.16.21-0.21-default",
- 'kernel_params' => "debug=3",
+ 'kernel_params' => "debug=0",
'export_type' => 'nfs',
'attr_start_xdmcp' => 'kdm',
});