summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsbin/itzks-update-disklserver-squashfs-images3
1 files changed, 3 insertions, 0 deletions
diff --git a/sbin/itzks-update-disklserver-squashfs-images b/sbin/itzks-update-disklserver-squashfs-images
index ef34f37..e9906c6 100755
--- a/sbin/itzks-update-disklserver-squashfs-images
+++ b/sbin/itzks-update-disklserver-squashfs-images
@@ -129,8 +129,10 @@ for chroot in ${ltsp_chroots}; do
for priv_key_file in id_ecdsa id_ecdsa_sk id_ed25519 id_ed25519_sk id_rsa; do
if [ -e "/root/.ssh/${priv_key_file}.DLW" ] && [ ! -e "${LTSP_OPT}/${chroot}/root/.ssh/${priv_key_file}" ]; then
+ mkdir -p "${LTSP_OPT}/${chroot}/root/.ssh/"
cp "/root/.ssh/${priv_key_file}.DLW" "${LTSP_OPT}/${chroot}/root/.ssh/${priv_key_file}"
elif [ -e "/root/.ssh/${priv_key_file}" ] && [ ! -e "${LTSP_OPT}/${chroot}/root/.ssh/${priv_key_file}" ]; then
+ mkdir -p "${LTSP_OPT}/${chroot}/root/.ssh/"
cp "/root/.ssh/${priv_key_file}" "${LTSP_OPT}/${chroot}/root/.ssh/${priv_key_file}"
fi
@@ -139,6 +141,7 @@ for chroot in ${ltsp_chroots}; do
# Copy the SSH authorized_keys file for DLWs to ${LTSP_OPT}/${chroot}/root/.ssh/authorized_keys (e.g. disklserver:/root/.ssh/authorized_keys)
# Use host's authorized_keys file for granting DLW access via SSH as root without password
if [ -e "/root/.ssh/authorized_keys" ] && [ ! -e "${LTSP_OPT}/${chroot}/root/.ssh/authorized_keys" ]; then
+ mkdir -p "${LTSP_OPT}/${chroot}/root/.ssh/"
cp "/root/.ssh/authorized_keys" "${LTSP_OPT}/${chroot}/root/.ssh/authorized_keys"
fi