Commit e09b62e3 authored by Mike Hibler's avatar Mike Hibler

More nits related to root's .ssh dir.

parent ef076c85
......@@ -222,7 +222,8 @@ sub doboot()
}
close(NKEYS);
if (! -e $authkeysold && system("cp -pf $authkeys $authkeysold")) {
if (-e $authkeys && ! -e $authkeysold &&
system("cp -pf $authkeys $authkeysold")) {
warning("Could not backup $authkeys");
}
if (system("mv -f $authkeysnew $authkeys")) {
......
......@@ -260,6 +260,7 @@ if (! -x "$BINDIR/rc/rc.localize" || system("$BINDIR/rc/rc.localize boot")) {
system("mv $ROOTSSHDIR.bak $ROOTSSHDIR");
die("Could not clean root .ssh directory");
}
system("rm -rf $ROOTSSHDIR.bak");
print "Cleaning mail spool files ...\n";
system("rm -rf $MAILDIR/*");
......
......@@ -366,6 +366,7 @@ if (! -x "$BINDIR/rc/rc.localize" || system("$BINDIR/rc/rc.localize boot")) {
system("mv $ROOTSSHDIR.bak $ROOTSSHDIR");
die("Could not clean root .ssh directory");
}
system("rm -rf $ROOTSSHDIR.bak");
print "Cleaning mail spool files ...\n";
system("rm -rf $MAILDIR/*");
......
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