1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
|
#! /usr/bin/perl
# -----------------------------------------------------------------------------
# Copyright (c) 2006, 2007 - OpenSLX GmbH
#
# This program is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
#
# If you have any feedback please consult http://openslx.org/feedback and
# send your suggestions, praise, or complaints to feedback@openslx.org
#
# General information about OpenSLX can be found at http://openslx.org/
# -----------------------------------------------------------------------------
use strict;
my $abstract = q[
slxconfig
This script can be used to display or change the OpenSLX configuration
database. You can create systems that use a specific vendor-OS
and you can create clients for these systems, too.
];
use Getopt::Long qw(:config pass_through);
use Pod::Usage;
# add the folder this script lives in and the lib-folder to perl's
# search path for modules:
use FindBin;
use lib "$FindBin::RealBin";
use lib "$FindBin::RealBin/../lib";
use lib "$FindBin::RealBin/../config-db";
# development path to config-db
use OpenSLX::Basics;
use OpenSLX::ConfigDB;
use OpenSLX::DBSchema;
my (
$helpReq,
$manReq,
$verbose,
$versionReq,
);
GetOptions(
'help|?' => \$helpReq,
'man' => \$manReq,
'verbose' => \$verbose,
'version' => \$versionReq,
) or pod2usage(2);
pod2usage(-msg => $abstract, -verbose => 0, -exitval => 1) if $helpReq;
if ($manReq) {
$ENV{LANG} = 'en_EN';
# avoid dubious problem with perldoc in combination with UTF-8 that
# leads to strange dashes and single-quotes being used
pod2usage(-verbose => 2)
}
if ($versionReq) {
system('slxversion');
exit 1;
}
openslxInit();
my $openslxDB = OpenSLX::ConfigDB->new();
$openslxDB->connect();
my $action = shift @ARGV;
if ($action =~ m[^add-system$]i) {
addSystemToConfigDB(@ARGV);
} elsif ($action =~ m[^add-client$]i) {
addClientToConfigDB(@ARGV);
} elsif ($action =~ m[^change-system$]i) {
changeSystemInConfigDB(@ARGV);
} elsif ($action =~ m[^change-client$]i) {
changeClientInConfigDB(@ARGV);
} elsif ($action =~ m[^list-c]) {
print _tr("List of the matching clients:\n");
listClients(@ARGV);
} elsif ($action =~ m[^list-e]) {
print _tr("List of the matching exports:\n");
listExports(@ARGV);
} elsif ($action =~ m[^list-s]) {
print _tr("List of the matching systems:\n");
listSystems(@ARGV);
} elsif ($action =~ m[^list-v]) {
print _tr("List of the matching vendor-OSes:\n");
listVendorOSes(@ARGV);
} elsif ($action =~ m[^remove-client$]i) {
removeClientFromConfigDB(@ARGV);
} elsif ($action =~ m[^remove-system$]i) {
removeSystemFromConfigDB(@ARGV);
} else {
print STDERR _tr("You need to specify exactly one of these actions:
add-client
add-system
change-client
change-system
list-client
list-export
list-system
list-vendoros
remove-client
remove-system
Try '%s --help' for more info.\n", $0);
}
$openslxDB->disconnect();
exit;
sub parseKeyValueArgs
{
my $allowedKeys = shift;
my $table = shift;
my %dataHash;
while (my $param = shift) {
if ($param !~ m[^\s*([\w\-]+)\s*=(.+)$]) {
die _tr("value specification %s has unknown format, expected <key>=<value>\n",
$param);
}
my $key = lc($1);
my $value = $2;
if (!grep { $_ eq $key } @$allowedKeys) {
die _tr("unknown attribute '%s' specified for %s\n", $key, $table);
}
$dataHash{$key} = $value;
}
return \%dataHash;
}
sub dumpElements
{
my $objName = shift;
my $nameClause = shift || sub { "\t$_->{name}\n" };
if ($verbose) {
foreach my $elem (@_) {
print "$objName '$elem->{name}':\n";
print join(
'',
map {
my $spc = ' 'x25;
my $val = $elem->{$_};
$val =~ s[\n][\n\t$spc ]g;
"\t$_"
.substr($spc, length($_))
." = $val\n";
}
sort keys %$elem
);
}
} else {
print join('', sort map &$nameClause, @_);
}
}
sub listClients
{
my @clientKeys
= map { (/^(\w+)\W/) ? $1 : $_; }
@{$DbSchema->{tables}->{client}};
my $clientData = parseKeyValueArgs(\@clientKeys, 'client', @_);
dumpElements(
'client', undef,
map {
my @sysIDs = $openslxDB->aggregatedSystemIDsOfClient($_);
$_->{systems}
= join "\n",
map { $_->{name} }
sort { $a->{name} cmp $b->{name} }
$openslxDB->fetchSystemByID(\@sysIDs, 'name');
$_;
}
sort { $a->{name} cmp $b->{name} }
$openslxDB->fetchClientByFilter($clientData)
);
}
sub listExports
{
my @exportKeys
= map { (/^(\w+)\W/) ? $1 : $_; }
@{$DbSchema->{tables}->{export}};
my $exportData = parseKeyValueArgs(\@exportKeys, 'export', @_);
dumpElements(
'export',
sub {
"\t$_->{name}".substr(' ' x 30, length($_->{name}))."($_->{type})\n"
},
map {
my $vendorOS
= $openslxDB->fetchVendorOSByID($_->{vendor_os_id}, 'name');
if (defined $vendorOS) {
$_->{vendor_os_id} .= " ($vendorOS->{name})";
}
$_;
}
sort { $a->{name} eq $b->{name} || $a->{type} cmp $b->{type} }
$openslxDB->fetchExportByFilter($exportData)
);
}
sub listSystems
{
my @systemKeys
= map { (/^(\w+)\W/) ? $1 : $_; }
@{$DbSchema->{tables}->{system}};
my $systemData = parseKeyValueArgs(\@systemKeys, 'system', @_);
dumpElements(
'system', undef,
map {
my @clientIDs = $openslxDB->aggregatedClientIDsOfSystem($_);
$_->{clients}
= join "\n",
map { $_->{name} }
sort { $a->{name} cmp $b->{name} }
$openslxDB->fetchClientByID(\@clientIDs, 'name');
my $export = $openslxDB->fetchExportByID($_->{export_id});
if (defined $export) {
$_->{export_id} = "$export->{name} ($export->{type})";
}
$_;
}
sort { $a->{name} cmp $b->{name} }
$openslxDB->fetchSystemByFilter($systemData)
);
}
sub listVendorOSes
{
my @vendorOSKeys
= map { (/^(\w+)\W/) ? $1 : $_; }
@{$DbSchema->{tables}->{vendor_os}};
my $vendorOSData = parseKeyValueArgs(\@vendorOSKeys, 'vendor_os', @_);
dumpElements('vendor-OS', undef,
sort { $a->{name} cmp $b->{name} }
$openslxDB->fetchVendorOSByFilter($vendorOSData));
}
sub addClientToConfigDB
{
my $clientName = shift;
if (!length($clientName)) {
die _tr("you have to specify the name for the new client\n");
}
my @clientKeys
= map { (/^(\w+)\W/) ? $1 : $_; }
@{$DbSchema->{tables}->{client}};
push @clientKeys, 'systems';
my $clientData = parseKeyValueArgs(\@clientKeys, 'client', @_);
$clientData->{name} = $clientName;
my @systemIDs;
if (exists $clientData->{systems}) {
@systemIDs
= map {
my $system
= $openslxDB->fetchSystemByFilter({ 'name' => $_ });
if (!defined $system) {
die _tr("system '%s' doesn't exist!\n", $_);
}
$system->{id};
}
split '\s*,\s*', $clientData->{systems};
delete $clientData->{systems};
}
if (!length($clientData->{mac})) {
die _tr("you have to specify the MAC for the new client\n");
}
if ($clientData->{mac} !~ m[^(?:[[:xdigit:]][[:xdigit:]]:){5}?[[:xdigit:]][[:xdigit:]]$]) {
die _tr("unknown MAC-format given, expected something like '01:02:03:04:05:06'!\n");
}
if ($openslxDB->fetchClientByFilter({ 'name' => $clientName })) {
die _tr("the client '%s' already exists in the DB, giving up!\n",
$clientName);
}
if ($openslxDB->fetchClientByFilter({ 'mac' => $clientData->{mac} })) {
die _tr("a client with the MAC '%s' already exists in the DB, giving up!\n",
$clientData->{mac});
}
my $clientID = $openslxDB->addClient([$clientData]);
vlog 0, _tr("client '%s' has been successfully added to DB (ID=%s)\n",
$clientName, $clientID);
if (defined @systemIDs) {
$openslxDB->addSystemIDsToClient($clientID, \@systemIDs);
}
if ($verbose) {
listClients("id=$clientID");
}
}
sub addSystemToConfigDB
{
my $systemName = shift;
if (!length($systemName)) {
die _tr("you have to specify the name of the new system!\n");
}
my @systemKeys
= map { (/^(\w+)\W/) ? $1 : $_; }
@{$DbSchema->{tables}->{system}};
push @systemKeys, 'clients', 'export';
my $systemData = parseKeyValueArgs(\@systemKeys, 'system', @_);
$systemData->{name} = $systemName;
if (!length($systemData->{export})) {
$systemData->{export} = $systemName;
# try falling back to given system name
}
my $exportName = $systemData->{export};
delete $systemData->{export};
my $export
= $openslxDB->fetchExportByFilter({ 'name' => $exportName });
if (!defined $export) {
die _tr("export '%s' could not be found in DB, giving up!\n", $exportName);
}
$systemData->{export_id} = $export->{id};
my @clientIDs;
if (exists $systemData->{clients}) {
@clientIDs
= map {
my $client
= $openslxDB->fetchClientByFilter({ 'name' => $_ });
if (!defined $client) {
die _tr("client '%s' doesn't exist in DB, giving up!\n", $_);
}
$client->{id};
}
split '\s*,\s*', $systemData->{clients};
delete $systemData->{clients};
} else {
# no clients given, so we add this system to the default client,
# which will make this system bootable by *all* clients (unless
# they are configured otherwise).
push @clientIDs, 0;
}
if ($openslxDB->fetchSystemByFilter({ 'name' => $systemName })) {
die _tr("the system '%s' already exists in the DB, giving up!\n",
$systemName);
}
if ($systemName =~ m[\bkde\b]) {
# activate kdm and X if system is based on kde:
$systemData->{attr_start_xdmcp} = 'kdm'
unless exists $systemData->{attr_start_xdmcp};
$systemData->{attr_start_x} = 'yes'
unless exists $systemData->{attr_start_x};
}
if ($systemName =~ m[\bgnome\b]) {
# activate gdm and X if system is based on GNOME:
$systemData->{attr_start_xdmcp} = 'gdm'
unless exists $systemData->{attr_start_xdmcp};
$systemData->{attr_start_x} = 'yes'
unless exists $systemData->{attr_start_x};
}
my $systemID = $openslxDB->addSystem([$systemData]);
vlog 0, _tr("system '%s' has been successfully added to DB (ID=%s)\n",
$systemName, $systemID);
if (defined @clientIDs) {
$openslxDB->addClientIDsToSystem($systemID, \@clientIDs);
}
if ($verbose) {
listSystems("id=$systemID");
}
}
sub changeClientInConfigDB
{
my $clientName = shift;
if (!length($clientName)) {
die _tr("you have to specify the name for the client you'd like to change!\n");
}
my @clientKeys
= map { (/^(\w+)\W/) ? $1 : $_; }
@{$DbSchema->{tables}->{client}};
push @clientKeys, 'systems', 'add-systems', 'remove-systems';
my $clientData = parseKeyValueArgs(\@clientKeys, 'client', @_);
my $client = $openslxDB->fetchClientByFilter({'name' => $clientName});
if (!defined $client) {
die _tr("the client '%s' doesn't exists in the DB, giving up!\n",
$clientName);
}
my @systemIDs;
if (exists $clientData->{systems}) {
@systemIDs
= map {
my $system
= $openslxDB->fetchSystemByFilter({ 'name' => $_ });
if (!defined $system) {
die _tr("system '%s' doesn't exist!\n", $_);
}
$system->{id};
}
split ",", $clientData->{systems};
delete $clientData->{systems};
}
if (exists $clientData->{'add-systems'}) {
@systemIDs = $openslxDB->fetchSystemIDsOfClient($client->{id});
push @systemIDs,
map {
my $system
= $openslxDB->fetchSystemByFilter({ 'name' => $_ });
if (!defined $system) {
die _tr("system '%s' doesn't exist!\n", $_);
}
$system->{id};
}
split ",", $clientData->{'add-systems'};
delete $clientData->{'add-systems'};
}
if (exists $clientData->{'remove-systems'}) {
@systemIDs = $openslxDB->fetchSystemIDsOfClient($client->{id});
foreach my $sysName (split ",", $clientData->{'remove-systems'}) {
my $system
= $openslxDB->fetchSystemByFilter({ 'name' => $sysName });
if (!defined $system) {
die _tr("system '%s' doesn't exist!\n", $sysName);
}
@systemIDs = grep { $_ != $system->{id} } @systemIDs;
}
delete $clientData->{'remove-systems'};
}
if (length($clientData->{mac})
&& $clientData->{mac} !~ m[^(?:[[:xdigit:]][[:xdigit:]]:){5}?[[:xdigit:]][[:xdigit:]]$]) {
die _tr("unknown MAC-format given, expected something like '01:02:03:04:05:06'!\n");
}
$openslxDB->changeClient($client->{id}, [$clientData]);
vlog 0, _tr("client '%s' has been successfully changed\n", $clientName);
if (defined @systemIDs) {
$openslxDB->setSystemIDsOfClient($client->{id}, \@systemIDs);
}
if ($verbose) {
listClients("id=$client->{id}");
}
}
sub changeSystemInConfigDB
{
my $systemName = shift;
if (!length($systemName)) {
die _tr("you have to specify the name of the system you'd like to change!\n");
}
my @systemKeys
= map { (/^(\w+)\W/) ? $1 : $_; }
@{$DbSchema->{tables}->{system}};
push @systemKeys, 'clients', 'add-clients', 'remove-clients';
my $systemData = parseKeyValueArgs(\@systemKeys, 'system', @_);
my $system = $openslxDB->fetchSystemByFilter({'name' => $systemName});
if (!defined $system) {
die _tr("the system '%s' doesn't exists in the DB, giving up!\n",
$systemName);
}
my @clientIDs;
if (exists $systemData->{clients}) {
@clientIDs
= map {
my $client
= $openslxDB->fetchClientByFilter({ 'name' => $_ });
if (!defined $client) {
die _tr("client '%s' doesn't exist in DB, giving up!\n", $_);
}
$client->{id};
}
split ",", $systemData->{clients};
delete $systemData->{clients};
}
if (exists $systemData->{'add-clients'}) {
@clientIDs = $openslxDB->fetchClientIDsOfSystem($system->{id});
push @clientIDs,
map {
my $client
= $openslxDB->fetchClientByFilter({ 'name' => $_ });
if (!defined $client) {
die _tr("client '%s' doesn't exist!\n", $_);
}
$client->{id};
}
split ",", $systemData->{'add-clients'};
delete $systemData->{'add-clients'};
}
if (exists $systemData->{'remove-clients'}) {
@clientIDs = $openslxDB->fetchClientIDsOfSystem($system->{id});
foreach my $clientName (split ",", $systemData->{'remove-clients'}) {
my $client
= $openslxDB->fetchClientByFilter({ 'name' => $clientName });
if (!defined $client) {
die _tr("client '%s' doesn't exist!\n", $clientName);
}
@clientIDs = grep { $_ != $client->{id} } @clientIDs;
}
delete $systemData->{'remove-clients'};
}
$openslxDB->changeSystem($system->{id}, [$systemData]);
vlog 0, _tr("system '%s' has been successfully changed\n", $systemName);
if (defined @clientIDs) {
$openslxDB->setClientIDsOfSystem($system->{id}, \@clientIDs);
}
if ($verbose) {
listSystems("id=$system->{id}");
}
}
sub removeClientFromConfigDB
{
my $clientName = shift;
if (!length($clientName)) {
die _tr("you have to specify the name of the client you'd like to remove!\n");
}
my $clientData = parseKeyValueArgs(['name'], 'client', @_);
my $client = $openslxDB->fetchClientByFilter({'name' => $clientName});
if (!defined $client) {
die _tr("the client '%s' doesn't exists in the DB, giving up!\n",
$clientName);
}
if ($client->{id} == 0) {
die _tr("you can't remove the default-client!\n");
}
$openslxDB->removeClient($client->{id});
vlog 0, _tr("client '%s' has been successfully removed from DB\n",
$clientName);
}
sub removeSystemFromConfigDB
{
my $systemName = shift;
if (!length($systemName)) {
die _tr("you have to specify the name of the system you'd like to remove!\n");
}
my $systemData = parseKeyValueArgs(['name'], 'system', @_);
my $system = $openslxDB->fetchSystemByFilter({'name' => $systemName});
if (!defined $system) {
die _tr("the system '%s' doesn't exists in the DB, giving up!\n",
$systemName);
}
if ($system->{id} == 0) {
die _tr("you can't remove the default-client!\n");
}
$openslxDB->removeSystem($system->{id});
vlog 0, _tr("system '%s' has been successfully removed from DB\n",
$systemName);
}
__END__
=head1 NAME
slxconfig - OpenSLX-script to view & change the configurational database
=head1 SYNOPSIS
slxconfig [options] <action> <key-value-pairs>
=head3 Options
--help brief help message
--man show full documentation
--verbose be more verbose
--version show version
=head3 Actions
=over 8
=item B<< add-client <client-name> mac=<MAC> [<key>=<value> ...] >>
adds a new client to the config-DB
=item B<< add-system <system-name> [export=<export-name>] \ >>
=item B<< <key>=<value> ...] >>
adds a new system to the config-DB
=item B<< change-client <client-name> [<key>=<value> ...] >>
changes the data of an existing system in the config-DB
=item B<< change-system <system-name> [<key>=<value> ...] >>
changes the data of an exiisting system in the config-DB
=item B<< list-clients [<key>=<value> ...] >>
lists all clients in config-DB (optionally matching given criteria)
=item B<< list-exports [<key>=<value> ...] >>
lists all exports in config-DB (optionally matching given criteria)
=item B<< list-systems [<key>=<value> ...] >>
lists all systems in config-DB (optionally matching given
criteria)
=item B<< list-vendoroses [<key>=<value> ...] >>
lists all vendor-OSes in config-DB (optionally matching given criteria)
=item B<< remove-client <client-name> >>
removes a client from the config-DB
=item B<< remove-system <system-name> >>
removes a system from the config-DB
=back
=head1 DESCRIPTION
B<slxconfig> can be used to view the contents of the configurational database.
Additionally, you can add systems as well as clients and change their specific
boot configuration.
=head1 OPTIONS
=over 8
=item B<< --help >>
Prints a brief help message and exits.
=item B<< --man >>
Prints the manual page and exits.
=item B<< --verbose >>
Prints more information during execution of any action.
=item B<< --version >>
Prints the version and exits.
=back
=head1 EXAMPLES
=head3 Listing existing Clients / Exports / Systems / Vendor-OSes
=over 8
=item B<< slxconfig list-client >>
=item B<< slxconfig list-export >>
=item B<< slxconfig list-system >>
=item B<< slxconfig list-vendoros >>
lists all existing instances of the respective DB-objects.
=item B<< slxconfig list-client id=3 >>
lists the client with id=3
=item B<< slxconfig list-export type=nfs >>
lists the exports of type 'nfs'
=back
=head3 Adding a new System to an exported Vendor-OS
=over 8
=item B<< slxconfig add-system debian-4.0 >>
adds a new system named 'debian-4.0' to the config-DB that will
use the export of the same name. No client will be associated
with this system, yet.
=item B<< slxconfig add-system suse-10.1 export-name=suse-10.1-kde \ >>
=item B<< clients=PC131,PC132,PC133 \ >>
=item B<< label="Linux Desktop" >>
adds a new system name 'suse-10.1' to the config-DB that will
use the export named 'suse-10.1-kde'. The system will be labeled
'Linux Desktop' and the clients 'PC131, 'PC132' and 'PC133' are
associated with this system (so they can boot it).
=back
=head3 Adding a new Client
=over 8
=item B<< slxconfig add-client vmware-1 mac=01:02:03:04:05:06 >>
adds a new client named 'vmware-1', being identified by the MAC
'01:02:03:04:05:06' to the config-DB. No system will be
associated with this client, yet (so it can't boot anything).
=item B<< slxconfig add-client vmware-1 mac=01:02:03:04:05:06 \ >>
=item B<< systems=suse-10.1,debian-4.0 \ >>
=item B<< attr_start_x=no >>
adds a new client named 'vmware-1', being identified by the MAC
'01:02:03:04:05:06' to the config-DB. The systems 'suse-10.1' &
'Debian-4.0' will be associated with this client (so it will
offer these systems for booting).
During boot, the X-server will not be started by this client
(so the systems will stay in console mode).
=back
=head3 Changing a System
=over 8
=item B<< slxconfig change-system suse-10.1 attr_start_xdmcp=gnome >>
will change the system named 'suse-10.1' such that it will use
the GNOME session manager.
=item B<< slxconfig change-system suse-10.1 add-clients=vmware-1 >>
will associate the client 'vmware-1' with the system named
'suse-10.1'.
=item B<< slxconfig change-system suse-10.1 remove-clients=vmware-1 >>
will remove the client 'vmware-1' from the system named
'suse-10.1'.
=back
=head3 Changing a Client
=over 8
=item B<< slxconfig change-client PC131 attr_start_snmp=yes >>
will change the client named 'PC131' such that it will start
the SNMP daemon on all systems that it boots.
=item B<< slxconfig change-client PC131 add-systems=Debian-4.0 >>
will associate the system 'Debian-4.0' with the client named
'PC131'.
=item B<< slxconfig change-client PC131 remove-systems=Debian-4.0 >>
will remove the system 'Debian-4.0' from the client named
'PC131'.
=back
=head3 Removing a System / Client
=over 8
=item B<< slxconfig remove-system <system-name> >>
=item B<< slxconfig remove-client <client-name> >>
removes the system/client with the given name.
=back
=head1 SEE ALSO
slxsettings, slxos-setup, slxos-export, slxconfig-demuxer
=head1 GENERAL OPENSLX OPTIONS
Being a part of OpenSLX, this script supports several other options
which can be used to overrule the OpenSLX settings:
--base-path=<string> basic path to project files
--bin-path=<string> path to binaries and scripts
--config-path=<string> path to configuration files
--db-basepath=<string> basic path to openslx database
--db-datadir=<string> data folder created under db-basepath
--db-name=<string> name of database
--db-spec=<string> full DBI-specification of database
--db-type=<string> type of database to connect to
--export-path=<string> path to root of all exported filesystems
--locale=<string> locale to use for translations
--logfile=<string> file to write logging output to
--private-path=<string> path to private data
--public-path=<string> path to public (client-accesible) data
--share-path=<string> path to sharable data
--stage1-path=<string> path to stage1 systems
--temp-path=<string> path to temporary data
--tftpboot-path=<string> path to root of tftp-server
--verbose-level=<int> level of logging verbosity (0-3)
Please refer to the C<slxsettings>-manpage for a more detailed description
of these options.
=cut
|