Skip to content

Commit

Permalink
static: skip ssh key generation during install mode run
Browse files Browse the repository at this point in the history
Signed-off-by: Ondrej Kubik <[email protected]>
  • Loading branch information
kubiko committed Feb 3, 2022
1 parent 2bf52ab commit 725846f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion static/usr/bin/core-sshd-host-keygen
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,7 @@ create_keys() {
"$hostkeys" /etc/ssh/ssh_host_ed25519_key -t ed25519
}

create_keys
# create keys only if we are in run mode, there is no use to create keys in install mode
if [ -n "$(grep "snapd_recovery_mode=install" /proc/cmdline)" ]; then
create_keys
fi

0 comments on commit 725846f

Please sign in to comment.