From 968e8234c77087025b77be5f22a6268914d88e62 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 5 Jun 2017 17:50:26 +0200 Subject: Add support for host key generation --- init | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'init') diff --git a/init b/init index 35838e5..83a4c27 100755 --- a/init +++ b/init @@ -383,6 +383,14 @@ o="nodev,noexec,nosuid,size=512M" o+=",mode=0755,uid=$(id -u build),gid=$(id -g build)" echo "tmpfs /build/tftp tmpfs $o 0 0" >>$fstab +# Generate a host key. Used, for example, by the bbot agent to authenticate +# with a controller. +# +mkdir -p /state/etc +if [ ! -e /state/etc/host-key.pem ]; then + openssl genrsa 4096 >/state/etc/host-key.pem +fi + # Configure Postfix. # cat <<<"$hname" >/etc/mailname -- cgit v1.1