From 65556841d342d74059f7bc71e7496c64e3f23056 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Mon, 21 Aug 2006 12:03:33 +0000 Subject: * now that project name is fixed, we use it: 'ODLX' => 'OpenSLX' and 'odlx' => 'openslx' git-svn-id: http://svn.openslx.org/svn/openslx/trunk@321 95ad53e4-c205-0410-b2fa-d234c58c8868 --- config-db/config-demuxer.pl | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'config-db/config-demuxer.pl') diff --git a/config-db/config-demuxer.pl b/config-db/config-demuxer.pl index c5fe2c39..47b78922 100755 --- a/config-db/config-demuxer.pl +++ b/config-db/config-demuxer.pl @@ -6,8 +6,8 @@ use lib $FindBin::Bin; use Getopt::Long qw(:config pass_through); -use ODLX::Basics; -use ODLX::ConfigDB; +use OpenSLX::Basics; +use OpenSLX::ConfigDB; my ( $dryRun, @@ -24,20 +24,20 @@ GetOptions( # would have been written ); -odlxInit(); +openslxInit(); -my $odlxDB = connectConfigDB(); +my $openslxDB = connectConfigDB(); -my $configPath = "$odlxConfig{'private-basepath'}/config"; +my $configPath = "$openslxConfig{'private-basepath'}/config"; if (!-d $configPath) { die _tr("Unable to access config-path '%s'!", $configPath); } -my $tempPath = "$odlxConfig{'temp-basepath'}/oslx-demuxer"; +my $tempPath = "$openslxConfig{'temp-basepath'}/oslx-demuxer"; mkdir $tempPath; if (!-d $tempPath) { die _tr("Unable to create or access temp-path '%s'!", $tempPath); } -my $exportPath = "$odlxConfig{'public-basepath'}/tftpboot"; +my $exportPath = "$openslxConfig{'public-basepath'}/tftpboot"; system("rm -rf $exportPath/client-conf/* $exportPath/pxe/pxelinux.cfg/*"); system("mkdir -p $exportPath/client-conf $exportPath/pxe/pxelinux.cfg"); if (!-d $exportPath) { @@ -50,7 +50,7 @@ if (!$dryRun) { writeConfigurations(); } -disconnectConfigDB($odlxDB); +disconnectConfigDB($openslxDB); system("rm -rf $tempPath"); @@ -178,9 +178,9 @@ sub writeSystemConfigurations sub initSystemConfigurations { - $defaultSystem = fetchSystemsByID($odlxDB, 0); + $defaultSystem = fetchSystemsByID($openslxDB, 0); - foreach my $s (fetchSystemsByFilter($odlxDB)) { + foreach my $s (fetchSystemsByFilter($openslxDB)) { next unless $s->{id} > 0; vlog 2, _tr('read system %d:%s...', $s->{id}, $s->{name}); @@ -215,19 +215,19 @@ sub linkClientToSystems sub demuxClientConfigurations { my %groups; - foreach my $g (fetchGroupsByFilter($odlxDB)) { + foreach my $g (fetchGroupsByFilter($openslxDB)) { vlog 2, _tr('read group %d:%s...', $g->{id}, $g->{name}); $groups{$g->{id}} = $g; } - $defaultClient = fetchClientsByID($odlxDB, 0); + $defaultClient = fetchClientsByID($openslxDB, 0); - foreach my $client (fetchClientsByFilter($odlxDB)) { + foreach my $client (fetchClientsByFilter($openslxDB)) { next unless $client->{id} > 0; vlog 2, _tr('read client %d:%s...', $client->{id}, $client->{name}); # add all systems directly linked to client: -my @sysIDs = fetchSystemIDsOfClient($odlxDB, $client->{id}); +my @sysIDs = fetchSystemIDsOfClient($openslxDB, $client->{id}); linkClientToSystems($client, @sysIDs ); @@ -238,12 +238,12 @@ my @sysIDs = fetchSystemIDsOfClient($odlxDB, $client->{id}); map { $groups{$_} } grep { exists $groups{$_} } # just to be safe: filter out unknown group-IDs - fetchGroupIDsOfClient($odlxDB, $client->{id}); + fetchGroupIDsOfClient($openslxDB, $client->{id}); foreach my $group (@clientGroups) { # fetch and add all systems that the client inherits from # the current group: linkClientToSystems($client, - fetchSystemIDsOfGroup($odlxDB, $group->{id})); + fetchSystemIDsOfGroup($openslxDB, $group->{id})); # merge configuration from this group into the current client: vlog 3, _tr('merging from group %d:%s...', $group->{id}, $group->{name}); -- cgit v1.2.3-55-g7522