diff options
-rwxr-xr-x | installer/slxos-export | 20 | ||||
-rwxr-xr-x | installer/slxos-setup | 25 | ||||
-rwxr-xr-x | os-plugins/slxos-plugin | 18 |
3 files changed, 23 insertions, 40 deletions
diff --git a/installer/slxos-export b/installer/slxos-export index 65cb7655..908bdb37 100755 --- a/installer/slxos-export +++ b/installer/slxos-export @@ -35,23 +35,22 @@ use OpenSLX::Basics; use OpenSLX::OSExport::Engine; use OpenSLX::Utils; -my ($helpReq, $manReq, $verbose, $versionReq,); +my %option; GetOptions( - 'help|?' => \$helpReq, - 'man' => \$manReq, - 'verbose' => \$verbose, - 'version' => \$versionReq, + 'help|?' => \$option{helpReq}, + 'man' => \$option{manReq}, + 'version' => \$option{versionReq}, ) or pod2usage(2); -pod2usage(-msg => $abstract, -verbose => 0, -exitval => 1) if $helpReq; -if ($manReq) { +pod2usage(-msg => $abstract, -verbose => 0, -exitval => 1) if $option{helpReq}; +if ($option{manReq}) { # avoid dubious problem with perldoc in combination with UTF-8 that # leads to strange dashes and single-quotes being used $ENV{LC_MESSAGES} = 'POSIX'; pod2usage(-verbose => 2); } -if ($versionReq) { +if ($option{versionReq}) { system('slxversion'); exit 1; } @@ -176,7 +175,6 @@ slxos-export [options] <action> --help brief help message --man show full documentation - --verbose show more information during execution --version show version =head3 Actions @@ -254,10 +252,6 @@ Prints a brief help message and exits. Prints the manual page and exits. -=item B<--verbose> - -Prints more information during execution of any action. - =item B<--version> Prints the version and exits. diff --git a/installer/slxos-setup b/installer/slxos-setup index 6777ec4d..84b90301 100755 --- a/installer/slxos-setup +++ b/installer/slxos-setup @@ -36,27 +36,21 @@ use OpenSLX::Basics; use OpenSLX::OSSetup::Engine; use OpenSLX::Utils; -my ( - $helpReq, - $manReq, - $verbose, - $versionReq, -); +my %option; GetOptions( - 'help|?' => \$helpReq, - 'man' => \$manReq, - 'verbose' => \$verbose, - 'version' => \$versionReq, + 'help|?' => \$option{helpReq}, + 'man' => \$option{manReq}, + 'version' => \$option{versionReq}, ) or pod2usage(2); -pod2usage(-msg => $abstract, -verbose => 0, -exitval => 1) if $helpReq; -if ($manReq) { +pod2usage(-msg => $abstract, -verbose => 0, -exitval => 1) if $option{helpReq}; +if ($option{manReq}) { # avoid dubious problem with perldoc in combination with UTF-8 that # leads to strange dashes and single-quotes being used $ENV{LC_MESSAGES} = 'POSIX'; pod2usage(-verbose => 2) } -if ($versionReq) { +if ($option{versionReq}) { system('slxversion'); exit 1; } @@ -196,7 +190,6 @@ slxos-setup [options] <action> <action-params> ... --help brief help message --man show full documentation - --verbose show more information during execution --version show version =head3 Actions @@ -265,10 +258,6 @@ Prints a brief help message and exits. Prints the manual page and exits. -=item B<--verbose> - -Prints more information during execution of any action. - =item B<--version> Prints the version and exits. diff --git a/os-plugins/slxos-plugin b/os-plugins/slxos-plugin index 52c80796..6797b25e 100755 --- a/os-plugins/slxos-plugin +++ b/os-plugins/slxos-plugin @@ -34,23 +34,23 @@ use OpenSLX::Basics; use OpenSLX::OSPlugin::Engine; use OpenSLX::Utils; -my ($helpReq, $manReq, $verbose, $versionReq,); +my %option; GetOptions( - 'help|?' => \$helpReq, - 'man' => \$manReq, - 'verbose' => \$verbose, - 'version' => \$versionReq, + 'help|?' => \$option{helpReq}, + 'man' => \$option{manReq}, + 'verbose' => \$option{verbose}, + 'version' => \$option{versionReq}, ) or pod2usage(2); -pod2usage(-msg => $abstract, -verbose => 0, -exitval => 1) if $helpReq; -if ($manReq) { +pod2usage(-msg => $abstract, -verbose => 0, -exitval => 1) if $option{helpReq}; +if ($option{manReq}) { # avoid dubious problem with perldoc in combination with UTF-8 that # leads to strange dashes and single-quotes being used $ENV{LC_MESSAGES} = 'POSIX'; pod2usage(-verbose => 2); } -if ($versionReq) { +if ($option{versionReq}) { system('slxversion'); exit 1; } @@ -67,7 +67,7 @@ if ($action =~ m[^list]i) { print join( '', map { - if ($verbose) { + if ($option{verbose}) { my $description = $pluginInfo->{$_}->{description}; $description .= "\t " |