summaryrefslogtreecommitdiffstats
path: root/config-db/slxsetup.pl
diff options
context:
space:
mode:
authorOliver Tappe2006-10-14 13:52:14 +0200
committerOliver Tappe2006-10-14 13:52:14 +0200
commitaefff5ed5b85b792dd7fe151acd318215812adb1 (patch)
treecd2d72e13d822b241e5ea665022c138440b144ee /config-db/slxsetup.pl
parent* added check for requireed perl-modules before the installation process. (diff)
downloadcore-aefff5ed5b85b792dd7fe151acd318215812adb1.tar.gz
core-aefff5ed5b85b792dd7fe151acd318215812adb1.tar.xz
core-aefff5ed5b85b792dd7fe151acd318215812adb1.zip
* shortened output for --help (now only gives an option-overview), but added an abstract
to that output, in order to give a hint what the script actually does. * replaced option=s by option=<string> and option=i by option=<int>, as Dirk suggested. * fixed two typos with $noshow instead of $noShow git-svn-id: http://svn.openslx.org/svn/openslx/trunk@459 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/slxsetup.pl')
-rwxr-xr-xconfig-db/slxsetup.pl96
1 files changed, 52 insertions, 44 deletions
diff --git a/config-db/slxsetup.pl b/config-db/slxsetup.pl
index 2b7ce15c..f374ed66 100755
--- a/config-db/slxsetup.pl
+++ b/config-db/slxsetup.pl
@@ -21,6 +21,14 @@ use lib "$FindBin::RealBin";
use OpenSLX::Basics;
+my $abstract = q[
+slxsetup.pl
+ This script provides an easy way to show & change the local OpenSLX
+ settings. As an alternative you can always edit the file
+ /etc/opt/openslx/settings.local
+ directly.
+];
+
my (
$noShow,
$quiet,
@@ -31,7 +39,7 @@ my (
);
GetOptions(
- 'noshow' => \$noshow,
+ 'noshow' => \$noShow,
# will display current configuration
'quiet' => \$quiet,
# will avoid printing anything
@@ -42,7 +50,7 @@ GetOptions(
'man' => \$manReq,
'version' => \$versionReq,
);
-pod2usage(1) if $helpReq;
+pod2usage(-msg => $abstract, -verbose => 0, -exitval => 1) if $helpReq;
pod2usage(-verbose => 2) if $manReq;
if ($versionReq) {
system('slxversion');
@@ -96,7 +104,7 @@ if ($changeCount) {
close(SETTINGS);
}
-if (!($noshow || $quiet)) {
+if (!($noShow || $quiet)) {
print "\n"._tr("resulting settings:")."\n";
foreach my $key (sort keys %openslxConfig) {
print "\t$key=$openslxConfig{$key}\n";
@@ -114,33 +122,33 @@ slxsetup.pl - OpenSLX-script to show & change local settings
slxsetup.pl [options]
Script Options:
- --noshow do not print resulting settings
- --quiet do not print anything
- --remove=s remove given key from settings
+ --noshow do not print resulting settings
+ --quiet do not print anything
+ --remove=<string> remove given key from settings
OpenSLX Options:
- --base-path=s basic path to project files
- --bin-path=s path to binaries and scripts
- --config-path=s path to configuration files
- --db-basepath=s basic path to openslx database
- --db-datadir=s data folder created under db-basepath
- --db-name=s name of database
- --db-spec=s full DBI-specification of database
- --db-type=s type of database to connect to
- --export-path=s path to root of all exported filesystems
- --locale=s locale to use for translations
- --logfile=s file to write logging output to
- --private-path=s path to private data
- --public-path=s path to public (client-accesible) data
- --share-path=s path to sharable data
- --temp-path=s path to temporary data
- --tftpboot-path=s path to root of tftp-server
- --verbose-level=i level of logging verbosity (0-3)
+ --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
+ --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)
General Options:
- --help brief help message
- --man full documentation
- --version show version
+ --help brief help message
+ --man full documentation
+ --version show version
=head1 OPTIONS
@@ -156,7 +164,7 @@ Avoids printing the resulting settings after any changes have been applied.
Runs the script without printing anything.
-=item B<--remove=s>
+=item B<--remove=<string>>
Removes key B<s> from settings (apply more than once to remove several keys).
@@ -166,108 +174,108 @@ Removes key B<s> from settings (apply more than once to remove several keys).
=over 8
-=item B<--base-path=s>
+=item B<--base-path=<string>>
Sets basic path to project files.
Default is $SLX_BASE_PATH (usually F</opt/openslx>).
-=item B<--bin-path=s>
+=item B<--bin-path=<string>>
Sets path to binaries and scripts.
Default is $SLX_BASE_PATH/bin (usually F</opt/openslx/bin>).
-=item B<--config-path=s>
+=item B<--config-path=<string>>
Sets path to configuration files.
Default is $SLX_CONFIG_PATH (usually F</etc/opt/openslx>).
-=item B<--db-basepath=s>
+=item B<--db-basepath=<string>>
Sets basic path to openslx database.
Default is $SLX_DB_PATH (usually F</var/opt/openslx/db>).
-=item B<--db-datadir=s>
+=item B<--db-datadir=<string>>
Sets data folder created under db-basepath.
Default is $SLX_DB_DATADIR (usually empty as it depends on db-type
whether or not such a directory is required at all).
-=item B<--db-name=s>
+=item B<--db-name=<string>>
Gives the name of the database to connect to.
Default is $SLX_DB_NAME (usually C<openslx>).
-=item B<--db-spec=s>
+=item B<--db-spec=<string>>
Gives the full DBI-specification of database to connect to. Content depends
on the db-type.
Default is $SLX_DB_SPEC (usually empty as it will be built automatically).
-=item B<--db-type=s>
+=item B<--db-type=<string>>
Sets the type of database to connect to (CSV, SQLite, mysql, ...).
Default $SLX_DB_TYPE (usually C<CSV>).
-=item B<--export-path=s>
+=item B<--export-path=<string>>
Sets path to root of all exported filesystems. For each type of export (NFS,
NBD, ...) a separate folder will be created in here.
Default is $SLX_EXPORT_PATH (usually F</srv/openslx/export>.
-=item B<--locale=s>
+=item B<--locale=<string>>
Sets the locale to use for translations.
Defaults to the system's standard locale.
-=item B<--logfile=s>
+=item B<--logfile=<string>>
Specifies a file where logging output will be written to.
Default is to log to STDERR.
-=item B<--private-path=s>
+=item B<--private-path=<string>>
Sets path to private data, where the config-db, vendor_oses and configurational
extensions will be stored.
Default is $SLX_PRIVATE_PATH (usually F</var/opt/openslx>.
-=item B<--public-path=s>
+=item B<--public-path=<string>>
Sets path to public (client-accesible) data.
Default is $SLX_PUBLIC_PATH (usually F</srv/openslx>.
-=item B<--share-path=s>
+=item B<--share-path=<string>>
Sets path to sharable data, where distro-specs and functionality templates
will be stored.
Default is $SLX_SHARE_PATH (usually F</opt/openslx/share>.
-=item B<--temp-path=s>
+=item B<--temp-path=<string>>
Sets path to temporary data.
Default is $SLX_TEMP_PATH (usually F</tmp>.
-=item B<--tftpboot-path=s>
+=item B<--tftpboot-path=<string>>
Sets path to root of tftp-server from which clients will access their files.
Default is $SLX_TFTPBOOT_PATH (usually F</srv/openslx/tftpboot>.
-=item B<--verbose-level=i>
+=item B<--verbose-level=<int>>
Sets the level of logging verbosity (0-3).