Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
a6e608d1
Commit
a6e608d1
authored
Sep 13, 2005
by
Mike Hibler
Browse files
Don't try to backup authorized_keys (and thus fail) if the file doesn't exist.
parent
c938a298
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/common/config/rc.localize
View file @
a6e608d1
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004 University of Utah and the Flux Group.
# Copyright (c) 2004
, 2005
University of Utah and the Flux Group.
# All rights reserved.
#
use
English
;
...
...
@@ -124,8 +124,10 @@ sub doboot()
my
$authkeys
=
"
/root/.ssh/authorized_keys
";
my
$authkeys2
=
"
/root/.ssh/authorized_keys2
";
system
("
cp -pf
$authkeys
$authkeys2
")
==
0
or
fatal
("
Could not backup root ssh authorized_keys file
");
if
(
-
e
"
$authkeys
")
{
system
("
cp -pf
$authkeys
$authkeys2
")
==
0
or
fatal
("
Could not backup root ssh authorized_keys file
");
}
if
(
!
open
(
AUTHKEYS
,
"
>
${authkeys}
.new
"))
{
warning
("
Could not open
${authkeys}
.new: $!
");
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment