From 27bb12eec0d46e8d2dd0d19d73f772962a779762 Mon Sep 17 00:00:00 2001 From: Alex Bradbury Date: Sun, 17 Jun 2012 15:16:05 +0100 Subject: [PATCH] avoid race condition with initial ssh key generation on first boot --- raspi-config | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/raspi-config b/raspi-config index 9b16130..8473d01 100755 --- a/raspi-config +++ b/raspi-config @@ -138,6 +138,10 @@ do_memory_split() { } do_ssh() { + if [ -e /var/log/regen_ssh_keys.log ] && ! grep -q "^finished"; then + whiptail --msgbox "Initial ssh key generation still running. Please wait and try again." 20 60 2 + return 1 + fi whiptail --yesno "Would you like the SSH server enabled or disabled?" 20 60 2 \ --yes-button Enable --no-button Disable RET=$?