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

Oops, do not overwrite the passwd/group files again if the vnode

is rebooting. Just when creating.
parent 36cfccdf
...@@ -25,6 +25,7 @@ my $optlist = "d"; ...@@ -25,6 +25,7 @@ my $optlist = "d";
my $debug = 1; my $debug = 1;
my $leaveme = 0; my $leaveme = 0;
my $cleaning = 0; my $cleaning = 0;
my $rebooting= 0;
my $vnodeid; my $vnodeid;
# #
...@@ -243,8 +244,8 @@ else { ...@@ -243,8 +244,8 @@ else {
} }
if ($ret ne VNODE_STATUS_STOPPED()) { if ($ret ne VNODE_STATUS_STOPPED()) {
MyFatal("vnode $vnodeid not stopped, no booting!"); MyFatal("vnode $vnodeid not stopped, no booting!");
} }
$rebooting = 1;
} }
# #
...@@ -255,7 +256,8 @@ sub callback($) ...@@ -255,7 +256,8 @@ sub callback($)
my ($path) = @_; my ($path) = @_;
if (SHAREDHOST()) { if (SHAREDHOST()) {
if (system("/bin/cp -f ". if (!$rebooting &&
system("/bin/cp -f ".
"$TMGROUP $TMPASSWD $TMSHADOW $TMGSHADOW $path/etc") != 0) { "$TMGROUP $TMPASSWD $TMSHADOW $TMGSHADOW $path/etc") != 0) {
return -1; return -1;
} }
......
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