From aefff5ed5b85b792dd7fe151acd318215812adb1 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sat, 14 Oct 2006 11:52:14 +0000 Subject: * 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= and option=i by option=, 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 --- config-db/slxsetup.pl | 96 ++++++++++++++++++++++++++++----------------------- 1 file changed, 52 insertions(+), 44 deletions(-) (limited to 'config-db/slxsetup.pl') 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= 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= basic path to project files + --bin-path= path to binaries and scripts + --config-path= path to configuration files + --db-basepath= basic path to openslx database + --db-datadir= data folder created under db-basepath + --db-name= name of database + --db-spec= full DBI-specification of database + --db-type= type of database to connect to + --export-path= path to root of all exported filesystems + --locale= locale to use for translations + --logfile= file to write logging output to + --private-path= path to private data + --public-path= path to public (client-accesible) data + --share-path= path to sharable data + --temp-path= path to temporary data + --tftpboot-path= path to root of tftp-server + --verbose-level= 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=> Removes key B from settings (apply more than once to remove several keys). @@ -166,108 +174,108 @@ Removes key B from settings (apply more than once to remove several keys). =over 8 -=item B<--base-path=s> +=item B<--base-path=> Sets basic path to project files. Default is $SLX_BASE_PATH (usually F). -=item B<--bin-path=s> +=item B<--bin-path=> Sets path to binaries and scripts. Default is $SLX_BASE_PATH/bin (usually F). -=item B<--config-path=s> +=item B<--config-path=> Sets path to configuration files. Default is $SLX_CONFIG_PATH (usually F). -=item B<--db-basepath=s> +=item B<--db-basepath=> Sets basic path to openslx database. Default is $SLX_DB_PATH (usually F). -=item B<--db-datadir=s> +=item B<--db-datadir=> 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=> Gives the name of the database to connect to. Default is $SLX_DB_NAME (usually C). -=item B<--db-spec=s> +=item B<--db-spec=> 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=> Sets the type of database to connect to (CSV, SQLite, mysql, ...). Default $SLX_DB_TYPE (usually C). -=item B<--export-path=s> +=item B<--export-path=> 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. -=item B<--locale=s> +=item B<--locale=> Sets the locale to use for translations. Defaults to the system's standard locale. -=item B<--logfile=s> +=item B<--logfile=> 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=> Sets path to private data, where the config-db, vendor_oses and configurational extensions will be stored. Default is $SLX_PRIVATE_PATH (usually F. -=item B<--public-path=s> +=item B<--public-path=> Sets path to public (client-accesible) data. Default is $SLX_PUBLIC_PATH (usually F. -=item B<--share-path=s> +=item B<--share-path=> Sets path to sharable data, where distro-specs and functionality templates will be stored. Default is $SLX_SHARE_PATH (usually F. -=item B<--temp-path=s> +=item B<--temp-path=> Sets path to temporary data. Default is $SLX_TEMP_PATH (usually F. -=item B<--tftpboot-path=s> +=item B<--tftpboot-path=> Sets path to root of tftp-server from which clients will access their files. Default is $SLX_TFTPBOOT_PATH (usually F. -=item B<--verbose-level=i> +=item B<--verbose-level=> Sets the level of logging verbosity (0-3). -- cgit v1.2.3-55-g7522