From 970ff0cfe393ccfa63d1f875483f3df7543d6c62 Mon Sep 17 00:00:00 2001 From: Chris Freas Date: Sun, 5 Mar 2017 11:40:59 -0500 Subject: Fix the 'ssh-server-key' script to use the 'yesno' script as per dmbaturin's request. --- scripts/ssh-server-key | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/ssh-server-key b/scripts/ssh-server-key index 9712393..949d314 100755 --- a/scripts/ssh-server-key +++ b/scripts/ssh-server-key @@ -5,11 +5,10 @@ regen_host_keys () sudo /etc/init.d/ssh restart } -while true; do - read -p "Do you really want to remove the existing SSH host keys? " yn - case $yn in - [Yy]* ) regen_host_keys; break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done +echo "Do you really want to remove the existing SSH host keys? " +${vyatta_bindir}/yesno + +if [ $? -eq 0 ] +then + regen_host_keys +fi -- cgit v1.2.3