summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorOliver Tappe2008-02-09 20:41:04 +0100
committerOliver Tappe2008-02-09 20:41:04 +0100
commit1f4add508bab61590ce44f5d5f1f85e6ddc1fa7d (patch)
treef9e7eb0fc5ec10f769ca680616401128706d45e2 /bin
parent* fixed comment (diff)
downloadcore-1f4add508bab61590ce44f5d5f1f85e6ddc1fa7d.tar.gz
core-1f4add508bab61590ce44f5d5f1f85e6ddc1fa7d.tar.xz
core-1f4add508bab61590ce44f5d5f1f85e6ddc1fa7d.zip
* cmdline options are now collected in a hash instead of individual variables,
as this is much clearer git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1525 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'bin')
-rwxr-xr-xbin/slxsettings22
1 files changed, 11 insertions, 11 deletions
diff --git a/bin/slxsettings b/bin/slxsettings
index 907f6f60..07b268e9 100755
--- a/bin/slxsettings
+++ b/bin/slxsettings
@@ -43,17 +43,17 @@ use Pod::Usage;
use OpenSLX::Basics;
use OpenSLX::Utils;
-my ($quiet, @reset, $helpReq, $manReq, $versionReq, %givenSettings);
+my (@reset, %givenSettings, %option);
GetOptions(
- 'quiet' => \$quiet,
- 'help|?' => \$helpReq,
- 'man' => \$manReq,
- 'version' => \$versionReq,
+ 'quiet' => \$option{quiet},
+ 'help|?' => \$option{helpReq},
+ 'man' => \$option{manReq},
+ 'version' => \$option{versionReq},
);
-pod2usage(-msg => $abstract, -verbose => 0, -exitval => 1) if $helpReq;
-pod2usage(-verbose => 2) if $manReq;
-if ($versionReq) {
+pod2usage(-msg => $abstract, -verbose => 0, -exitval => 1) if $option{helpReq};
+pod2usage(-verbose => 2) if $option{manReq};
+if ($option{versionReq}) {
system('slxversion');
exit 1;
}
@@ -129,7 +129,7 @@ foreach my $key (keys %givenSettings) {
);
}
- vlog(0, _tr("setting %s to '%s'", $key, $value)) unless $quiet;
+ vlog(0, _tr("setting %s to '%s'", $key, $value)) unless $option{quiet};
my $externalKey = externalKeyFor($key);
if (!exists $settings{$externalKey} || $settings{$externalKey} ne $value) {
$settings{$externalKey} = $value;
@@ -144,11 +144,11 @@ foreach my $key (@reset) {
delete $settings{$externalKey};
vlog(0,
_tr("removing option '%s' from local settings", $key))
- unless $quiet;
+ unless $option{quiet};
} else {
vlog(0,
_tr("option '%s' didn't exist in local settings!", $key))
- unless $quiet;
+ unless $option{quiet};
}
$changed{$key}++;
}