Commit 2570c9de authored by Mike Hibler's avatar Mike Hibler
Browse files

Make sure command line override options actually do override.

parent eb7a9cfa
......@@ -145,6 +145,9 @@ if (defined($options{"n"})) {
}
if (defined($options{"Q"})) {
$quotaval = parsenumstr($options{"Q"});
foreach my $fs (keys %fsquotas) {
$fsquotas{$fs} = $quotaval;
}
}
if (defined($options{'F'})) {
if ($options{'F'} =~ /^(\d+(\.\d+)?)$/) {
......@@ -154,6 +157,9 @@ if (defined($options{'F'})) {
usage();
exit(1);
}
foreach my $fs (keys %fsmults) {
$fsmults{$fs} = $factor;
}
} else {
print STDERR "*** Factor must be a number.\n";
usage();
......@@ -327,17 +333,13 @@ sub getquotas($)
} else {
$root = "unknown";
}
if (defined($quotaval)) {
$tgtrefq = $quotaval;
} elsif (exists($fsquotas{$root})) {
if (exists($fsquotas{$root})) {
$tgtrefq = $fsquotas{$root};
} else {
print STDERR "*** $fs: unknown root FS '$root'\n";
return undef;
}
if (defined($factor)) {
$tgtmult = $factor;
} elsif (exists($fsmults{$root})) {
if (exists($fsmults{$root})) {
$tgtmult = $fsmults{$root};
} else {
print STDERR "*** $fs: unknown root FS '$root'\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment