Commit 24b76052 authored by Leigh Stoller's avatar Leigh Stoller

Put initial root pubkey into the DB (into the sitevar I created a

couple of weeks ago) so that tmcd can return the pubkey for image
localization.
parent 0a3d5b65
......@@ -699,6 +699,17 @@ Phase "ssh", "Setting up root ssh from boss to ops", sub {
DoneIfExists($ROOT_PRIVKEY);
ExecQuietFatal("$SSH_KEYGEN -t rsa1 -P '' -f $ROOT_PRIVKEY");
};
#
# Stick it into the DB.
# WARNING: This sitevar (node/ssh_pubkey) is referenced in tmcd.c
#
Phase "sitevar", "Inserting pubkey into DB", sub {
my $pubkey = `cat $ROOT_PUBKEY`;
chomp $pubkey;
ExecQuietFatal("echo \"update sitevariables set value='$pubkey' ".
" where name='node/ssh_pubkey'\" | ".
"$MYSQL $DBNAME");
};
Phase "ssh", "Editing ssh config file", sub {
DoneIfEdited($SSH_CONFIG);
AppendToFileFatal($SSH_CONFIG,
......
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