Commit e52ecf0e authored by Leigh Stoller's avatar Leigh Stoller

Create the node host keys and stash in /usr/testbed/etc so that we can

get them into the MFSs.
parent a651bd13
......@@ -19,6 +19,28 @@ sub Install($$$)
ExecQuietFatal("$SSH_KEYGEN -t rsa -P '' -f $ROOT_PRIVKEY");
};
#
# Create a set of hostkeys for the images.
#
Phase "imagekeysdir", "Creating $IMAGEKEYS_DIR", sub {
DoneIfExists($IMAGEKEYS_DIR);
mkdir $IMAGEKEYS_DIR,0775 or
PhaseFail("Unable to create $IMAGEKEYS_DIR : $!");
ExecQuietFatal("$CHGRP tbadmin $IMAGEKEYS_DIR");
};
my %keytypes = (
"rsa1" => "ssh_host_key",
"rsa" => "ssh_host_rsa_key",
"dsa" => "ssh_host_dsa_key");
Phase "imagekeys", "Creating host keys for images", sub {
foreach my $type (keys(%keytypes)) {
my $name = $keytypes{$type};
ExecQuietFatal("$SSH_KEYGEN -t $type -N '' ".
" -f $IMAGEKEYS_DIR/$name");
}
};
#
# Stick it into the DB.
# WARNING: This sitevar (node/ssh_pubkey) is referenced in tmcd.c
#
......
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