summaryrefslogtreecommitdiff
path: root/scripts/ssh-server-key
diff options
context:
space:
mode:
authorChris Freas <code@packetbusters.net>2017-03-05 11:40:59 -0500
committerChris Freas <code@packetbusters.net>2017-03-05 11:40:59 -0500
commit970ff0cfe393ccfa63d1f875483f3df7543d6c62 (patch)
tree0f9e9217f48bc92264e7a6a593a36fb2b63a2d01 /scripts/ssh-server-key
parent59a22f722a98a66f94ee5ff65f10a8e20d79181c (diff)
downloadvyatta-op-970ff0cfe393ccfa63d1f875483f3df7543d6c62.tar.gz
vyatta-op-970ff0cfe393ccfa63d1f875483f3df7543d6c62.zip
Fix the 'ssh-server-key' script to use the 'yesno' script as per dmbaturin's request.
Diffstat (limited to 'scripts/ssh-server-key')
-rwxr-xr-xscripts/ssh-server-key15
1 files 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