marsadm: disallow --force on 'all' resources

This commit is contained in:
Thomas Schoebel-Theuer 2013-04-17 11:18:41 +02:00
parent 9187bf210d
commit e02c06e265
1 changed files with 1 additions and 0 deletions

View File

@ -1188,6 +1188,7 @@ sub do_res {
}
if ($res eq "all" && $cmd ne "show") {
ldie "For safty reasons, --force is only allowed on explicitly named resources. Combination of 'all' with --force is disallowed!\n" if $force;
foreach $res (glob("$mars/resource-*")) {
next unless -e "$res/data-$host";
$res =~ s/^.*\/resource-(.*)$/$1/;