Commit e3ffd3c9 authored by Mike Hibler's avatar Mike Hibler
Browse files

Only attempt to update DB startupcmd column if there are any good nodes.

parent f8b27f40
......@@ -347,12 +347,14 @@ sub TBAdminMfsSelect($$@)
# set by the user when we enter admin mode, or those set by us when
# we leave admin mode.
#
my $cond = "node_id in (" . join(",", map("'$_'", @good)) . ")";
if (!DBQueryWarn("update nodes set startupcmd='', startstatus='none' ".
"where $cond")) {
if (@good > 0) {
my $cond = "node_id in (" . join(",", map("'$_'", @good)) . ")";
if (!DBQueryWarn("update nodes set startupcmd='', startstatus='none' ".
"where $cond")) {
print STDERR "*** $me:\n".
" Failed to clear startup state for @good!\n";
push(@bad, @good);
}
}
@{$failedref} = @bad
......
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