mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
distro-agnostic: dropbear-initramfs: make sure directory exists [cherry-pick]
This commit is contained in:
@@ -40,6 +40,11 @@ function install_distribution_agnostic() {
|
||||
# generate a default ssh key for login on dropbear in initramfs
|
||||
# this key should be changed by the user on first login
|
||||
display_alert "Generating a new SSH key pair for dropbear (initramfs)" "" ""
|
||||
|
||||
# Make sure that the relevant directory exists
|
||||
[[ -d "${SDCARD}"/etc/dropbear-initramfs ]] || mkdir "${SDCARD}"/etc/dropbear-initramfs
|
||||
|
||||
# Generate the SSH keys
|
||||
ssh-keygen -t ecdsa -f "${SDCARD}"/etc/dropbear-initramfs/id_ecdsa \
|
||||
-N '' -O force-command=cryptroot-unlock -C 'AUTOGENERATED_BY_ARMBIAN_BUILD' 2>&1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user