Commit 8c6eb224 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add existence check for rpms and deltas before allowing reboots.

Makes for easier failure termination if one of the files does not
exist.
parent 069260c3
......@@ -129,6 +129,26 @@ for ($i = 0; $i < $db_result->numrows; $i++) {
push(@nodes, $node);
$osid{$node} = $row{'def_boot_osid'};
#
# XXX - Check for existence of the delta files. We do this here
# cause its easier than looking for a failure later, when the node
# tries to install the delta. Not a general solution though. Needs
# more thought.
#
foreach my $delta (split(":", $row{'deltas'})) {
if (! -e $delta) {
die("Delta file $delta for node $node does not exist!");
}
}
#
# XXX - Ditto for RPMs.
#
foreach my $rpm (split(":", $row{'rpms'})) {
if (! -e $rpm) {
die("RPM $rpm for node $node does not exist!");
}
}
#
# If pingable, then the node is "waitable".
#
......
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