diff options
author | Oliver Tappe | 2007-03-23 15:02:40 +0100 |
---|---|---|
committer | Oliver Tappe | 2007-03-23 15:02:40 +0100 |
commit | 3b8ff91e40340d844237ce847598caf3fc758a90 (patch) | |
tree | 1f841a4fd9161482048b5b461da00d01f0ef00b0 /config-db | |
parent | Better handling of nfsv4 ... still to be improved (check combination (diff) | |
download | core-3b8ff91e40340d844237ce847598caf3fc758a90.tar.gz core-3b8ff91e40340d844237ce847598caf3fc758a90.tar.xz core-3b8ff91e40340d844237ce847598caf3fc758a90.zip |
* changed to be more quiet by default (old behaviour can be requested with --verbose)
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@809 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db')
-rwxr-xr-x | config-db/slxsettings | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/config-db/slxsettings b/config-db/slxsettings index 0a8e8965..c6a5817a 100755 --- a/config-db/slxsettings +++ b/config-db/slxsettings @@ -35,18 +35,16 @@ use OpenSLX::Basics; use OpenSLX::ConfigDB; my ( - $noShow, $quiet, @remove, %cmdlineSettings, $helpReq, $manReq, + $verbose, $versionReq, ); GetOptions( - 'noshow' => \$noShow, - # will display current configuration 'quiet' => \$quiet, # will avoid printing anything 'remove=s' => \@remove, @@ -56,6 +54,7 @@ GetOptions( 'help|?' => \$helpReq, 'man' => \$manReq, + 'verbose' => \$verbose, 'version' => \$versionReq, ); pod2usage(-msg => $abstract, -verbose => 0, -exitval => 1) if $helpReq; @@ -74,7 +73,7 @@ my $currSettings = $openslxDB->fetchSettings(); # ...and fetch current content of local settings file... open(SETTINGS, "< $openslxConfig{'config-path'}/settings.local"); -$/ = undef; +local $/ = undef; my $settings = <SETTINGS>; close(SETTINGS); @@ -129,7 +128,9 @@ if (scalar(keys %cmdlineSettings) > 0) { $currSettings = $openslxDB->fetchSettings(); } -if (!($noShow || $quiet)) { +$openslxDB->disconnect(); + +if ($verbose || !$changeCount) { my $text = $changeCount ? "resulting settings:" : "current settings:"; print "\n"._tr($text)."\n"; foreach my $key (sort keys %openslxConfig) { @@ -141,8 +142,6 @@ if (!($noShow || $quiet)) { } } -$openslxDB->disconnect(); - __END__ =head1 NAME @@ -154,7 +153,6 @@ slxsettings - OpenSLX-script to show & change local settings slxsettings [options] Script Options: - --noshow do not print resulting settings --quiet do not print anything --remove=<string> remove given key from settings @@ -180,6 +178,7 @@ slxsettings [options] General Options: --help brief help message --man full documentation + --verbose show more information --version show version =head1 OPTIONS @@ -188,10 +187,6 @@ slxsettings [options] =over 8 -=item B<--noshow> - -Avoids printing the resulting settings after any changes have been applied. - =item B<--quiet> Runs the script without printing anything. @@ -200,6 +195,9 @@ Runs the script without printing anything. Removes given key from settings (apply more than once to remove several keys). +=item B<--verbose> + +Prints the resulting settings after changes have been applied. =back =head3 OpenSLX Options |