mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-26 23:24:27 +02:00
Fix '-s' option
This commit is contained in:
parent
77434d86c7
commit
009bf015ee
@ -107,24 +107,26 @@ if ($opt_h) {
|
|||||||
exit $ERRORS{'OK'};
|
exit $ERRORS{'OK'};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!defined($opt_d)) {
|
my $partition = 0;
|
||||||
|
if (!defined($opt_s)) {
|
||||||
|
if (!defined($opt_d)) {
|
||||||
print "Option -d (--disk) needed\n";
|
print "Option -d (--disk) needed\n";
|
||||||
exit $ERRORS{'UNKNOWN'};
|
exit $ERRORS{'UNKNOWN'};
|
||||||
}
|
}
|
||||||
if (defined($opt_n) && !defined($opt_d)) {
|
if ($opt_d =~ /([0-9]+)/ && !defined($opt_n)) {
|
||||||
|
$partition = $1;
|
||||||
|
} elsif (!$opt_n){
|
||||||
|
print "Unknown -d: number expected... try another disk - number\n";
|
||||||
|
exit $ERRORS{'UNKNOWN'};
|
||||||
|
}
|
||||||
|
if (defined($opt_n) && !defined($opt_d)) {
|
||||||
print "Option -n (--name) need option -d (--disk)\n";
|
print "Option -n (--name) need option -d (--disk)\n";
|
||||||
exit $ERRORS{'UNKNOWN'};
|
exit $ERRORS{'UNKNOWN'};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$opt_a = 3 if (!$opt_a);
|
$opt_a = 3 if (!$opt_a);
|
||||||
|
|
||||||
my $partition = 0;
|
|
||||||
if ($opt_d =~ /([0-9]+)/ && !defined($opt_n)) {
|
|
||||||
$partition = $1;
|
|
||||||
} elsif (!$opt_n){
|
|
||||||
print "Unknown -d: number expected... try another disk - number\n";
|
|
||||||
exit $ERRORS{'UNKNOWN'};
|
|
||||||
}
|
|
||||||
if (!$opt_c) {
|
if (!$opt_c) {
|
||||||
$opt_c = 95;
|
$opt_c = 95;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user