diff --git a/debian/chroot.install b/debian/chroot.install index 1284f16..999a694 100755 --- a/debian/chroot.install +++ b/debian/chroot.install @@ -255,15 +255,16 @@ chroot /target update-grub sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /target/etc/ssh/sshd_config ### Add current authorized_keys from the rescue system if present if [ -f /root/.ssh/authorized_keys ]; then - cp /root/.ssh/authorized_keys /target/root/.ssh/authorized_keys + mkdir -p -- /target/root/.ssh/authorized_keys + cp -- /root/.ssh/authorized_keys /target/root/.ssh/authorized_keys else - printf '%b\\n' "${REDB}You might want to define an authorized key for SSH/root in /target/etc/ssh/sshd_config${RESET}" + printf '%b\n' "${REDB}You might want to define an authorized key for SSH/root in /target/etc/ssh/sshd_config${RESET}" fi ## }}} -printf '%b\\n' "${REDB}Please change the root's password :${RESET}" +printf '%b\n' "${REDB}Please change the root's password :${RESET}" chroot /target passwd -printf '%b\\n' "${GREEN}The system is still available on /target but you can now try to reboot the hardware." +printf '%b\n' "${GREEN}The system is still available on /target but you can now try to reboot the hardware.${RESET}" exit 0 # }}}