diff options
author | Riku Voipio <riku.voipio@linaro.org> | 2017-05-10 16:27:06 +0300 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2017-05-10 16:36:18 +0300 |
commit | f515e7e4b4cddfbd1d75694cf5998979256220d9 (patch) | |
tree | 9b8a5cc362850198361e5f4eb6f30fe403dce3cb /stretch-armhf-developer/customization/includes.chroot | |
parent | bdd3a944a7977530672b096a9da5b497d5e1c990 (diff) |
stretch: rc.local update ssh key generation
Stretch uses systemd socket actication vor ssh. unfortunately
postinst will still tries to restart sshd, which will fail as
socket is still listening. This leaves systemd think system is
in degraded state - ssh will still work but degraded state has
side-effects elsewhere.
Workaround by disabling socket first. And on the positive, the
dsa key workaround can now be removed...
Change-Id: Ibcc870170d36e4f4f8db4eb0f7e7830f62388ed3
Diffstat (limited to 'stretch-armhf-developer/customization/includes.chroot')
-rwxr-xr-x | stretch-armhf-developer/customization/includes.chroot/etc/rc.local | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/stretch-armhf-developer/customization/includes.chroot/etc/rc.local b/stretch-armhf-developer/customization/includes.chroot/etc/rc.local index 1f1d743..4e613ff 100755 --- a/stretch-armhf-developer/customization/includes.chroot/etc/rc.local +++ b/stretch-armhf-developer/customization/includes.chroot/etc/rc.local @@ -11,10 +11,13 @@ # # By default this script does nothing. -# Generate the SSH keys if non-existent -test -f /etc/ssh/ssh_host_rsa_key || dpkg-reconfigure openssh-server -# workaround for https://bugs.debian.org/850614 -test -f /etc/ssh/ssh_host_dsa_key || ssh-keygen -q -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa +# Generate the SSH keys if non-existent +if [ ! -f /etc/ssh/ssh_host_rsa_key ] +then + # else ssh service start in dpkg-reconfigure will fail + systemctl stop ssh.socket||true + dpkg-reconfigure openssh-server +fi exit 0 |