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 4, 2022
1 parent 2bf52ab commit b814ddd
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 ! grep -q "snapd_recovery_mode=install" /proc/cmdline; then
create_keys
fi

0 comments on commit b814ddd

Please sign in to comment.