summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config-db/OpenSLX/Basics.pm (renamed from config-db/ODLX/Basics.pm)82
-rw-r--r--config-db/OpenSLX/ConfigDB.pm (renamed from config-db/ODLX/ConfigDB.pm)14
-rw-r--r--config-db/OpenSLX/DBSchema.pm (renamed from config-db/ODLX/DBSchema.pm)4
-rw-r--r--config-db/OpenSLX/MetaDB/Base.pm (renamed from config-db/ODLX/MetaDB/Base.pm)38
-rw-r--r--config-db/OpenSLX/MetaDB/CSV.pm (renamed from config-db/ODLX/MetaDB/CSV.pm)20
-rw-r--r--config-db/OpenSLX/MetaDB/DBI.pm (renamed from config-db/ODLX/MetaDB/DBI.pm)14
-rw-r--r--config-db/OpenSLX/MetaDB/SQLite.pm (renamed from config-db/ODLX/MetaDB/SQLite.pm)22
-rw-r--r--config-db/OpenSLX/MetaDB/XML.pm (renamed from config-db/ODLX/MetaDB/XML.pm)6
-rw-r--r--config-db/OpenSLX/MetaDB/mysql.pm (renamed from config-db/ODLX/MetaDB/mysql.pm)18
-rw-r--r--config-db/OpenSLX/Translations/de_de_utf_8.pm (renamed from config-db/ODLX/Translations/de_de_utf_8.pm)0
-rw-r--r--config-db/OpenSLX/Translations/posix.pm (renamed from config-db/ODLX/Translations/posix.pm)0
-rwxr-xr-xconfig-db/config-demuxer.pl32
-rwxr-xr-xconfig-db/testConfDB.pl62
13 files changed, 156 insertions, 156 deletions
diff --git a/config-db/ODLX/Basics.pm b/config-db/OpenSLX/Basics.pm
index 70206468..5a797034 100644
--- a/config-db/ODLX/Basics.pm
+++ b/config-db/OpenSLX/Basics.pm
@@ -1,4 +1,4 @@
-package ODLX::Basics;
+package OpenSLX::Basics;
use strict;
use vars qw(@ISA @EXPORT $VERSION);
@@ -8,12 +8,12 @@ $VERSION = 0.02;
@ISA = qw(Exporter);
@EXPORT = qw(
- &odlxInit %odlxConfig
+ &openslxInit %openslxConfig
&_tr &trInit
&vlog
);
-use vars qw(%odlxConfig);
+use vars qw(%openslxConfig);
################################################################################
### Module implementation
@@ -25,10 +25,10 @@ use Getopt::Long;
my %translations;
my $loadedTranslationModule;
-# this hash will hold the active odlx configuration,
+# this hash will hold the active openslx configuration,
# it is populated from config files and/or cmdline arguments:
-%odlxConfig = (
- 'db-name' => 'odlx',
+%openslxConfig = (
+ 'db-name' => 'openslx',
'db-type' => 'CSV',
'locale' => $ENV{LANG},
# TODO: may need to be improved in order to be portable
@@ -37,56 +37,56 @@ my $loadedTranslationModule;
'shared-basepath' => '/usr/share/openslx',
'temp-basepath' => '/tmp',
);
-$odlxConfig{'db-basepath'} = "$odlxConfig{'private-basepath'}/db",
+$openslxConfig{'db-basepath'} = "$openslxConfig{'private-basepath'}/db",
-# specification of cmdline arguments that are shared by all odlx-scripts:
-my %odlxCmdlineArgs = (
- 'db-basepath=s' => \$odlxConfig{'db-basepath'},
- # basic path to odlx database, defaults to "$private-basepath/db"
- 'db-datadir=s' => \$odlxConfig{'db-datadir'},
+# specification of cmdline arguments that are shared by all openslx-scripts:
+my %openslxCmdlineArgs = (
+ 'db-basepath=s' => \$openslxConfig{'db-basepath'},
+ # basic path to openslx database, defaults to "$private-basepath/db"
+ 'db-datadir=s' => \$openslxConfig{'db-datadir'},
# data folder created under db-basepath, default depends on db-type
- 'db-spec=s' => \$odlxConfig{'db-spec'},
+ 'db-spec=s' => \$openslxConfig{'db-spec'},
# full specification of database, a special string defining the
# precise database to connect to (the contents of this string
# depend on db-type)
- 'db-name=s' => \$odlxConfig{'db-name'},
- # name of database, defaults to 'odlx'
- 'db-type=s' => \$odlxConfig{'db-type'},
+ 'db-name=s' => \$openslxConfig{'db-name'},
+ # name of database, defaults to 'openslx'
+ 'db-type=s' => \$openslxConfig{'db-type'},
# type of database to connect to (CSV, SQLite, ...), defaults to 'CSV'
- 'locale=s' => \$odlxConfig{'locale'},
+ 'locale=s' => \$openslxConfig{'locale'},
# locale to use for translations
- 'logfile=s' => \$odlxConfig{'locale'},
+ 'logfile=s' => \$openslxConfig{'locale'},
# file to write logging output to, defaults to STDERR
- 'private-basepath=s' => \$odlxConfig{'private-basepath'},
+ 'private-basepath=s' => \$openslxConfig{'private-basepath'},
# basic path to private data (which is accessible for clients and
# contains all data required for booting the clients)
- 'public-basepath=s' => \$odlxConfig{'public-basepath'},
+ 'public-basepath=s' => \$openslxConfig{'public-basepath'},
# basic path to public data (which contains database, vendorOSes
# and all local extensions [system specific scripts])
- 'shared-basepath=s' => \$odlxConfig{'shared-basepath'},
+ 'shared-basepath=s' => \$openslxConfig{'shared-basepath'},
# basic path to shared data (functionality templates and distro-specs)
- 'temp-basepath=s' => \$odlxConfig{'temp-basepath'},
+ 'temp-basepath=s' => \$openslxConfig{'temp-basepath'},
# basic path to temporary data (used during demuxing)
- 'verbose-level=i' => \$odlxConfig{'verbose-level'},
+ 'verbose-level=i' => \$openslxConfig{'verbose-level'},
# level of logging verbosity (0-3)
);
# filehandle used for logging:
-my $odlxLog = *STDERR;
+my $openslxLog = *STDERR;
# ------------------------------------------------------------------------------
sub vlog
{
my $minLevel = shift;
- return if $minLevel > $odlxConfig{'verbose-level'};
- print $odlxLog '-'x$minLevel, @_, "\n";
+ return if $minLevel > $openslxConfig{'verbose-level'};
+ print $openslxLog '-'x$minLevel, @_, "\n";
}
# ------------------------------------------------------------------------------
-sub odlxInit
+sub openslxInit
{
# try to read and evaluate config files:
- foreach my $f ("ODLX/odlxrc", "$ENV{HOME}/.odlxrc") {
+ foreach my $f ("OpenSLX/openslxrc", "$ENV{HOME}/.openslxrc") {
next unless open(CONFIG, "<$f");
while(<CONFIG>) {
chomp;
@@ -95,21 +95,21 @@ sub odlxInit
s/\s+$//;
next unless length;
my ($key, $value) = split(/\s*=\s*/, $_, 2);
- $odlxConfig{$key} = $value;
+ $openslxConfig{$key} = $value;
}
close CONFIG;
}
# push any cmdline argument directly into our config hash:
- GetOptions(%odlxCmdlineArgs);
+ GetOptions(%openslxCmdlineArgs);
- if (defined $odlxConfig{'logfile'}
- && open(LOG, ">>$odlxConfig{'logfile'}")) {
- $odlxLog
+ if (defined $openslxConfig{'logfile'}
+ && open(LOG, ">>$openslxConfig{'logfile'}")) {
+ $openslxLog
}
- if ($odlxConfig{'verbose-level'} >= 2) {
- foreach my $k (sort keys %odlxConfig) {
- vlog 2, "dump-config: $k = $odlxConfig{$k}";
+ if ($openslxConfig{'verbose-level'} >= 2) {
+ foreach my $k (sort keys %openslxConfig) {
+ vlog 2, "dump-config: $k = $openslxConfig{$k}";
}
}
@@ -120,10 +120,10 @@ sub odlxInit
# ------------------------------------------------------------------------------
sub trInit
{
- my $locale = $odlxConfig{'locale'};
+ my $locale = $openslxConfig{'locale'};
$locale =~ tr[A-Z.\-][a-z__];
- my $trModule = "ODLX::Translations::$locale";
+ my $trModule = "OpenSLX::Translations::$locale";
if ($loadedTranslationModule eq $trModule) {
# requested translations have already been loaded
return;
@@ -131,15 +131,15 @@ sub trInit
# load Posix-Translations first in order to fall back to English strings
# if a specific translation isn't available:
- if (eval "require ODLX::Translations::posix") {
- %translations = %ODLX::Translations::posix::translations;
+ if (eval "require OpenSLX::Translations::posix") {
+ %translations = %OpenSLX::Translations::posix::translations;
} else {
carp "Unable to load translations module 'posix' ($!).";
}
if ($locale ne 'posix') {
if (eval "require $trModule") {
- # Access ODLX::Translations::$locale::%translations
+ # Access OpenSLX::Translations::$locale::%translations
# via a symbolic reference...
no strict 'refs';
my $translationsRef = \%{"${trModule}::translations"};
diff --git a/config-db/ODLX/ConfigDB.pm b/config-db/OpenSLX/ConfigDB.pm
index f7f16755..6f8d811e 100644
--- a/config-db/ODLX/ConfigDB.pm
+++ b/config-db/OpenSLX/ConfigDB.pm
@@ -1,15 +1,15 @@
-package ODLX::ConfigDB;
+package OpenSLX::ConfigDB;
use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
$VERSION = 1.01; # API-version . implementation-version
################################################################################
-### This module defines the data abstraction layer for the ODLX configuration
+### This module defines the data abstraction layer for the OpenSLX configuration
### database.
### Aim of this abstraction is to hide the details of the data layout and
### the peculiarities of individual database types behind a simple interface
-### that offers straightforward access to and manipulation of the ODLX-systems
+### that offers straightforward access to and manipulation of the OpenSLX-systems
### and -clients (without the need to use SQL).
### The interface is divided into two parts:
### - data access methods (getting data)
@@ -53,8 +53,8 @@ my @manipulationExports = qw(
### private stuff
################################################################################
use Carp;
-use ODLX::Basics;
-use ODLX::DBSchema;
+use OpenSLX::Basics;
+use OpenSLX::DBSchema;
sub _checkAndUpgradeDBSchemaIfNecessary
{
@@ -128,9 +128,9 @@ sub connectConfigDB
# hash-ref with any additional info that might be required by
# specific metadb-module (not used yet)
- my $dbType = $odlxConfig{'db-type'};
+ my $dbType = $openslxConfig{'db-type'};
# name of underlying database module
- my $dbModule = "ODLX::MetaDB::$dbType";
+ my $dbModule = "OpenSLX::MetaDB::$dbType";
unless (eval "require $dbModule") {
confess _tr('Unable to load DB-module <%s> (%s)', $dbModule, $@);
}
diff --git a/config-db/ODLX/DBSchema.pm b/config-db/OpenSLX/DBSchema.pm
index 45c78044..477ced97 100644
--- a/config-db/ODLX/DBSchema.pm
+++ b/config-db/OpenSLX/DBSchema.pm
@@ -1,4 +1,4 @@
-package ODLX::DBSchema;
+package OpenSLX::DBSchema;
use strict;
use vars qw(@ISA @EXPORT $VERSION);
@@ -38,7 +38,7 @@ my @sharedAttributes = (
################################################################################
### DB-schema definition
-### This hash-ref describes the current ODLX configuration database schema.
+### This hash-ref describes the current OpenSLX configuration database schema.
### Each table is defined by a list of column descriptions.
### A column description is simply the name of the column followed by ':'
### followed by the data type description. The following data types are
diff --git a/config-db/ODLX/MetaDB/Base.pm b/config-db/OpenSLX/MetaDB/Base.pm
index f386dfc3..d59ce888 100644
--- a/config-db/ODLX/MetaDB/Base.pm
+++ b/config-db/OpenSLX/MetaDB/Base.pm
@@ -1,12 +1,12 @@
################################################################################
-# ODLX::MetaDB:Base - the base class for all MetaDB drivers
+# OpenSLX::MetaDB:Base - the base class for all MetaDB drivers
#
# Copyright 2006 by Oliver Tappe - all rights reserved.
#
# You may distribute this module under the terms of the GNU GPL v2.
################################################################################
-package ODLX::MetaDB::Base;
+package OpenSLX::MetaDB::Base;
use vars qw($VERSION);
$VERSION = 1.01; # API-version . implementation-version
@@ -16,20 +16,20 @@ $VERSION = 1.01; # API-version . implementation-version
=head1 NAME
-ODLX::MetaDB::Base - the base class for all MetaDB drivers
+OpenSLX::MetaDB::Base - the base class for all MetaDB drivers
=head1 SYNOPSIS
- package ODLX::MetaDB::coolnewDB;
+ package OpenSLX::MetaDB::coolnewDB;
use vars qw(@ISA $VERSION);
- @ISA = ('ODLX::MetaDB::Base');
+ @ISA = ('OpenSLX::MetaDB::Base');
$VERSION = 1.01;
- my $superVersion = $ODLX::MetaDB::Base::VERSION;
+ my $superVersion = $OpenSLX::MetaDB::Base::VERSION;
if ($superVersion < $VERSION) {
confess _tr('Unable to load module <%s> (Version <%s> required)',
- 'ODLX::MetaDB::Base', $VERSION);
+ 'OpenSLX::MetaDB::Base', $VERSION);
}
use coolnewDB;
@@ -45,7 +45,7 @@ ODLX::MetaDB::Base - the base class for all MetaDB drivers
{
my $self = shift;
- my $dbName = $odlxConfig{'db-name'};
+ my $dbName = $openslxConfig{'db-name'};
vlog 1, "trying to connect to coolnewDB-database <$dbName>";
$self->{'dbh'} = ... # get connection handle from coolnewDB
}
@@ -57,7 +57,7 @@ ODLX::MetaDB::Base - the base class for all MetaDB drivers
$self->{'dbh'}->disconnect;
}
- # override all methods of ODLX::MetaDB::Base in order to implement
+ # override all methods of OpenSLX::MetaDB::Base in order to implement
# a full MetaDB driver
...
@@ -66,16 +66,16 @@ MetaDB driver for the (imaginary) database B<coolnewDB>>
=head1 DESCRIPTION
-This class defines the MetaDB interface for the ODLX.
+This class defines the MetaDB interface for the OpenSLX.
Aim of the MetaDB abstraction is to make it possible to use a large set
of different databases (from CSV-files to a fullblown Oracle-installation)
transparently.
-While ODLX::ConfigDB represents the data layer to the outside world, each
-implementation of ODLX::MetaDB::Base provides a backend for a specific database.
+While OpenSLX::ConfigDB represents the data layer to the outside world, each
+implementation of OpenSLX::MetaDB::Base provides a backend for a specific database.
-This way, the different ODLX-scripts do not have to burden
+This way, the different OpenSLX-scripts do not have to burden
themselves with any DB-specific details, they just request the data they want
from the ConfigDB-layer and that in turn creates and communicates with the
appropriate MetaDB driver in order to connect to the database and fetch and/or
@@ -96,12 +96,12 @@ The MetaDB interface contains of four different parts:
=back
In order to implement a MetaDB driver for a specific database, you need
-to inherit from B<ODLX::MetaDB::Base> and implement the full interface. As this
+to inherit from B<OpenSLX::MetaDB::Base> and implement the full interface. As this
is quite some work, it might be wiser to actually inherit your driver from
-B<L<ODLX::MetaDB::DBI|ODLX::MetaDB::DBI>>, which is a default implementation for SQL databases.
+B<L<OpenSLX::MetaDB::DBI|OpenSLX::MetaDB::DBI>>, which is a default implementation for SQL databases.
If there is a DBD-driver for the database your new MetaDB driver wants to talk
-to then all you need to do is inherit from B<ODLX::MetaDB::DBI> and then
+to then all you need to do is inherit from B<OpenSLX::MetaDB::DBI> and then
reimplement L<C<connectConfigDB>> (and maybe some other methods in order to
improve efficiency).
@@ -124,7 +124,7 @@ The following basic methods need to be implemented in a MetaDB driver:
################################################################################
sub new
{
- confess "Don't create ODLX::MetaDB::Base - objects directly!";
+ confess "Don't create OpenSLX::MetaDB::Base - objects directly!";
}
=item C<connectConfigDB>
@@ -140,7 +140,7 @@ the following entries in order to find out which database to connect to:
=item C<$config{'db-basepath'}>
-basic path to odlx database, defaults to path of running script
+basic path to openslx database, defaults to path of running script
=item C<$config{'db-datadir'}>
@@ -157,7 +157,7 @@ C<%config>-entries).
=item C<$config{'db-name'}>
-the precise name of the database that should be connected (defaults to 'odlx').
+the precise name of the database that should be connected (defaults to 'openslx').
=back
diff --git a/config-db/ODLX/MetaDB/CSV.pm b/config-db/OpenSLX/MetaDB/CSV.pm
index c1c5a620..b291e33d 100644
--- a/config-db/ODLX/MetaDB/CSV.pm
+++ b/config-db/OpenSLX/MetaDB/CSV.pm
@@ -1,25 +1,25 @@
-package ODLX::MetaDB::CSV;
+package OpenSLX::MetaDB::CSV;
use vars qw(@ISA $VERSION);
-@ISA = ('ODLX::MetaDB::DBI');
+@ISA = ('OpenSLX::MetaDB::DBI');
$VERSION = 1.01; # API-version . implementation-version
################################################################################
### This class provides a MetaDB backend for CSV files (CSV = comma separated
### files).
### - each table will be stored into a CSV file.
-### - by default all files will be created inside a 'odlxdata-csv' directory.
+### - by default all files will be created inside a 'openslxdata-csv' directory.
################################################################################
use strict;
use Carp;
use Fcntl qw(:DEFAULT :flock);
-use ODLX::Basics;
-use ODLX::MetaDB::DBI $VERSION;
+use OpenSLX::Basics;
+use OpenSLX::MetaDB::DBI $VERSION;
-my $superVersion = $ODLX::MetaDB::DBI::VERSION;
+my $superVersion = $OpenSLX::MetaDB::DBI::VERSION;
if ($superVersion < $VERSION) {
confess _tr('Unable to load module <%s> (Version <%s> required, but <%s> found)',
- 'ODLX::MetaDB::DBI', $VERSION, $superVersion);
+ 'OpenSLX::MetaDB::DBI', $VERSION, $superVersion);
}
################################################################################
### implementation
@@ -35,11 +35,11 @@ sub connectConfigDB
{
my $self = shift;
- my $dbSpec = $odlxConfig{'db-spec'};
+ my $dbSpec = $openslxConfig{'db-spec'};
if (!defined $dbSpec) {
# build $dbSpec from individual parameters:
- my $dbBasepath = $odlxConfig{'db-basepath'};
- my $dbDatadir = $odlxConfig{'db-datadir'} || 'odlxdata-csv';
+ my $dbBasepath = $openslxConfig{'db-basepath'};
+ my $dbDatadir = $openslxConfig{'db-datadir'} || 'openslxdata-csv';
my $dbPath = "$dbBasepath/$dbDatadir";
mkdir $dbPath unless -e $dbPath;
$dbSpec = "f_dir=$dbPath";
diff --git a/config-db/ODLX/MetaDB/DBI.pm b/config-db/OpenSLX/MetaDB/DBI.pm
index 83372ad9..be47a061 100644
--- a/config-db/ODLX/MetaDB/DBI.pm
+++ b/config-db/OpenSLX/MetaDB/DBI.pm
@@ -1,7 +1,7 @@
-package ODLX::MetaDB::DBI;
+package OpenSLX::MetaDB::DBI;
use vars qw(@ISA $VERSION);
-@ISA = ('ODLX::MetaDB::Base');
+@ISA = ('OpenSLX::MetaDB::Base');
$VERSION = 1.01; # API-version . implementation-version
################################################################################
@@ -20,13 +20,13 @@ $VERSION = 1.01; # API-version . implementation-version
use strict;
use Carp;
use DBI;
-use ODLX::Basics;
-use ODLX::MetaDB::Base;
+use OpenSLX::Basics;
+use OpenSLX::MetaDB::Base;
-my $superVersion = $ODLX::MetaDB::Base::VERSION;
+my $superVersion = $OpenSLX::MetaDB::Base::VERSION;
if ($superVersion < $VERSION) {
confess _tr('Unable to load module <%s> (Version <%s> required, but <%s> found)',
- 'ODLX::MetaDB::Base', $VERSION, $superVersion);
+ 'OpenSLX::MetaDB::Base', $VERSION, $superVersion);
}
################################################################################
@@ -34,7 +34,7 @@ if ($superVersion < $VERSION) {
################################################################################
sub new
{
- confess "Don't call ODLX::MetaDB::DBI::new directly!";
+ confess "Don't call OpenSLX::MetaDB::DBI::new directly!";
}
sub disconnectConfigDB
diff --git a/config-db/ODLX/MetaDB/SQLite.pm b/config-db/OpenSLX/MetaDB/SQLite.pm
index c8aa30fe..f40c618f 100644
--- a/config-db/ODLX/MetaDB/SQLite.pm
+++ b/config-db/OpenSLX/MetaDB/SQLite.pm
@@ -1,22 +1,22 @@
-package ODLX::MetaDB::SQLite;
+package OpenSLX::MetaDB::SQLite;
use vars qw(@ISA $VERSION);
-@ISA = ('ODLX::MetaDB::DBI');
+@ISA = ('OpenSLX::MetaDB::DBI');
$VERSION = 1.01; # API-version . implementation-version
################################################################################
### This class provides a MetaDB backend for SQLite databases.
-### - by default the db will be created inside a 'odlxdata-sqlite' directory.
+### - by default the db will be created inside a 'openslxdata-sqlite' directory.
################################################################################
use strict;
use Carp;
-use ODLX::Basics;
-use ODLX::MetaDB::DBI $VERSION;
+use OpenSLX::Basics;
+use OpenSLX::MetaDB::DBI $VERSION;
-my $superVersion = $ODLX::MetaDB::DBI::VERSION;
+my $superVersion = $OpenSLX::MetaDB::DBI::VERSION;
if ($superVersion < $VERSION) {
confess _tr('Unable to load module <%s> (Version <%s> required, but <%s> found)',
- 'ODLX::MetaDB::DBI', $VERSION, $superVersion);
+ 'OpenSLX::MetaDB::DBI', $VERSION, $superVersion);
}
################################################################################
@@ -33,14 +33,14 @@ sub connectConfigDB
{
my $self = shift;
- my $dbSpec = $odlxConfig{'db-spec'};
+ my $dbSpec = $openslxConfig{'db-spec'};
if (!defined $dbSpec) {
# build $dbSpec from individual parameters:
- my $dbBasepath = $odlxConfig{'db-basepath'};
- my $dbDatadir = $odlxConfig{'db-datadir'} || 'odlxdata-sqlite';
+ my $dbBasepath = $openslxConfig{'db-basepath'};
+ my $dbDatadir = $openslxConfig{'db-datadir'} || 'openslxdata-sqlite';
my $dbPath = "$dbBasepath/$dbDatadir";
mkdir $dbPath unless -e $dbPath;
- my $dbName = $odlxConfig{'db-name'};
+ my $dbName = $openslxConfig{'db-name'};
$dbSpec = "dbname=$dbPath/$dbName";
}
vlog 1, "trying to connect to SQLite-database <$dbSpec>";
diff --git a/config-db/ODLX/MetaDB/XML.pm b/config-db/OpenSLX/MetaDB/XML.pm
index fd27c9b7..14a12174 100644
--- a/config-db/ODLX/MetaDB/XML.pm
+++ b/config-db/OpenSLX/MetaDB/XML.pm
@@ -1,4 +1,4 @@
-package ODLX::MetaDB::XML;
+package OpenSLX::MetaDB::XML;
use strict;
use vars qw(@ISA @EXPORT $VERSION);
@@ -18,7 +18,7 @@ $VERSION = 0.02;
################################################################################
use Carp;
use DBI;
-use ODLX::Base;
+use OpenSLX::Base;
################################################################################
### basics
@@ -28,7 +28,7 @@ sub metaConnectConfigDB
my $dbParams = shift;
my $dbPath = $dbParams->{'db-path'}
- || '/home/zooey/Sources/odlx/config-db/datafiles-xml';
+ || '/home/zooey/Sources/openslx/config-db/datafiles-xml';
mkdir $dbPath;
vlog 1, "trying to connect to XML-database <$dbPath>";
my $dbh = DBI->connect("dbi:AnyData:",
diff --git a/config-db/ODLX/MetaDB/mysql.pm b/config-db/OpenSLX/MetaDB/mysql.pm
index 625ef08f..dc6ef7d0 100644
--- a/config-db/ODLX/MetaDB/mysql.pm
+++ b/config-db/OpenSLX/MetaDB/mysql.pm
@@ -1,22 +1,22 @@
-package ODLX::MetaDB::mysql;
+package OpenSLX::MetaDB::mysql;
use vars qw(@ISA $VERSION);
-@ISA = ('ODLX::MetaDB::DBI');
+@ISA = ('OpenSLX::MetaDB::DBI');
$VERSION = 1.01; # API-version . implementation-version
################################################################################
### This class provides a MetaDB backend for mysql databases.
-### - by default the db will be created inside a 'odlxdata-mysql' directory.
+### - by default the db will be created inside a 'openslxdata-mysql' directory.
################################################################################
use strict;
use Carp;
-use ODLX::Basics;
-use ODLX::MetaDB::DBI $VERSION;
+use OpenSLX::Basics;
+use OpenSLX::MetaDB::DBI $VERSION;
-my $superVersion = $ODLX::MetaDB::DBI::VERSION;
+my $superVersion = $OpenSLX::MetaDB::DBI::VERSION;
if ($superVersion < $VERSION) {
confess _tr('Unable to load module <%s> (Version <%s> required, but <%s> found)',
- 'ODLX::MetaDB::DBI', $VERSION, $superVersion);
+ 'OpenSLX::MetaDB::DBI', $VERSION, $superVersion);
}
################################################################################
@@ -33,10 +33,10 @@ sub connectConfigDB
{
my $self = shift;
- my $dbSpec = $odlxConfig{'db-spec'};
+ my $dbSpec = $openslxConfig{'db-spec'};
if (!defined $dbSpec) {
# build $dbSpec from individual parameters:
- my $dbName = $odlxConfig{'db-name'};
+ my $dbName = $openslxConfig{'db-name'};
$dbSpec = "database=$dbName";
}
my $user = (getpwuid($>))[0];
diff --git a/config-db/ODLX/Translations/de_de_utf_8.pm b/config-db/OpenSLX/Translations/de_de_utf_8.pm
index 36a2a814..36a2a814 100644
--- a/config-db/ODLX/Translations/de_de_utf_8.pm
+++ b/config-db/OpenSLX/Translations/de_de_utf_8.pm
diff --git a/config-db/ODLX/Translations/posix.pm b/config-db/OpenSLX/Translations/posix.pm
index 4b48cb55..4b48cb55 100644
--- a/config-db/ODLX/Translations/posix.pm
+++ b/config-db/OpenSLX/Translations/posix.pm
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});
diff --git a/config-db/testConfDB.pl b/config-db/testConfDB.pl
index 9a400694..a1d9e5d3 100755
--- a/config-db/testConfDB.pl
+++ b/config-db/testConfDB.pl
@@ -4,24 +4,24 @@
use FindBin;
use lib $FindBin::Bin;
-use ODLX::Basics;
-use ODLX::ConfigDB qw(:access :manipulation);
+use OpenSLX::Basics;
+use OpenSLX::ConfigDB qw(:access :manipulation);
-odlxInit();
+openslxInit();
-my $odlxDB = connectConfigDB();
+my $openslxDB = connectConfigDB();
-addVendorOS($odlxDB, {
+addVendorOS($openslxDB, {
'name' => "suse-93-minimal",
'descr' => "SuSE 9.3 minimale Installation",
});
-addVendorOS($odlxDB, {
+addVendorOS($openslxDB, {
'name' => "suse-93-KDE",
'descr' => "SuSE 9.3 grafische Installation mit KDE",
});
-addVendorOS($odlxDB, {
+addVendorOS($openslxDB, {
'name' => "debian-31",
'descr' => "Debian 3.1 Default-Installation",
});
@@ -34,20 +34,20 @@ foreach my $id (1..10) {
'vendor_os_id' => 1 + $id % 3,
};
}
-addSystem($odlxDB, \@systems);
+addSystem($openslxDB, \@systems);
-removeSystem($odlxDB, [1,3,5,7,9,11,13,15,17,19] );
+removeSystem($openslxDB, [1,3,5,7,9,11,13,15,17,19] );
-changeSystem($odlxDB, [ 2 ], [ { 'name' => 'new name of 2'} ] );
+changeSystem($openslxDB, [ 2 ], [ { 'name' => 'new name of 2'} ] );
-changeSystem($odlxDB, [ 0 ], [ { 'attrStartX' => 'kde,gnome'} ] );
-changeSystem($odlxDB, [ 1,2,3 ], [ { 'attrHwMonitor' => '1280x1024'} ] );
-changeSystem($odlxDB, [ 4 ], [ { 'attrHwMonitor' => '800x600'} ] );
+changeSystem($openslxDB, [ 0 ], [ { 'attrStartX' => 'kde,gnome'} ] );
+changeSystem($openslxDB, [ 1,2,3 ], [ { 'attrHwMonitor' => '1280x1024'} ] );
+changeSystem($openslxDB, [ 4 ], [ { 'attrHwMonitor' => '800x600'} ] );
-changeSystem($odlxDB, 4, { 'id' => 114, 'name' => 'id should still be 4'} );
+changeSystem($openslxDB, 4, { 'id' => 114, 'name' => 'id should still be 4'} );
-my $metaDB = $odlxDB->{'meta-db'};
+my $metaDB = $openslxDB->{'meta-db'};
my $colDescrs = [
'id:pk',
'name:s.30',
@@ -124,70 +124,70 @@ foreach my $row (@rows) {
$metaDB->schemaDropTable('test2');
-my $clientG01ID = addClient($odlxDB, {
+my $clientG01ID = addClient($openslxDB, {
'name' => "PC-G-01",
'mac' => "00:14:85:80:00:35",
'boot_type' => 'pxe',
});
-my $clientG02ID = addClient($odlxDB, {
+my $clientG02ID = addClient($openslxDB, {
'name' => "PC-G-02",
'mac' => "00:14:85:80:00:36",
'boot_type' => 'pxe',
});
-my $clientG03ID = addClient($odlxDB, {
+my $clientG03ID = addClient($openslxDB, {
'name' => "PC-G-03",
'mac' => "00:14:85:80:00:37",
'boot_type' => 'pxe',
});
-my $clientG04ID = addClient($odlxDB, {
+my $clientG04ID = addClient($openslxDB, {
'name' => "PC-G-04",
'mac' => "00:14:85:80:00:38",
'boot_type' => 'pxe',
'unbootable' => 1,
});
-my $clientF01ID = addClient($odlxDB, {
+my $clientF01ID = addClient($openslxDB, {
'name' => "PC-F-01",
'mac' => "00:14:85:80:00:31",
'boot_type' => 'other',
});
-my $clientF02ID = addClient($odlxDB, {
+my $clientF02ID = addClient($openslxDB, {
'name' => "PC-F-02",
'mac' => "00:14:85:80:00:32",
'boot_type' => 'pxe',
});
-my $clientF03ID = addClient($odlxDB, {
+my $clientF03ID = addClient($openslxDB, {
'name' => "PC-F-03",
'mac' => "00:14:85:80:00:33",
'boot_type' => 'pxe',
});
-addClientIDsToSystem($odlxDB, 6, [$clientG01ID, $clientG02ID, $clientG03ID, $clientG04ID, $clientF01ID, $clientF02ID, $clientF03ID]);
+addClientIDsToSystem($openslxDB, 6, [$clientG01ID, $clientG02ID, $clientG03ID, $clientG04ID, $clientF01ID, $clientF02ID, $clientF03ID]);
-my $group1ID = addGroup($odlxDB, {
+my $group1ID = addGroup($openslxDB, {
'name' => "Gell-PCs",
'descr' => "Gell-Threemansion PCs from 2002",
'attrHwMouse' => 'serial',
});
-addClientIDsToGroup($odlxDB, $group1ID, [$clientG01ID, $clientF02ID, $clientG03ID]);
+addClientIDsToGroup($openslxDB, $group1ID, [$clientG01ID, $clientF02ID, $clientG03ID]);
-my $group2ID = addGroup($odlxDB, {
+my $group2ID = addGroup($openslxDB, {
'name' => "Teacher-PCs",
'descr' => "all PCs sitting on teacher's desks",
'attrHwMonitor' => '1600x1200',
});
-addClientIDsToGroup($odlxDB, $group2ID, [$clientG01ID, $clientF01ID]);
-addSystemIDsToGroup($odlxDB, $group2ID, [2, 3]);
+addClientIDsToGroup($openslxDB, $group2ID, [$clientG01ID, $clientF01ID]);
+addSystemIDsToGroup($openslxDB, $group2ID, [2, 3]);
-my $group3ID = addGroup($odlxDB, {
+my $group3ID = addGroup($openslxDB, {
'name' => "PCs in room G",
'descr' => "all PCs of room 234",
});
-addClientIDsToGroup($odlxDB, $group3ID, [$clientG01ID, $clientG02ID, $clientG03ID, $clientG04ID]);
+addClientIDsToGroup($openslxDB, $group3ID, [$clientG01ID, $clientG02ID, $clientG03ID, $clientG04ID]);
-disconnectConfigDB($odlxDB);
+disconnectConfigDB($openslxDB);