fixed ssh host key remove condition

This commit is contained in:
josch 2009-09-13 17:50:21 +00:00
parent 2f2f2471bc
commit 5b12344ba2

View file

@ -244,10 +244,10 @@ if [ ! -f /home/persistant/ssh_host_rsa_key ] ||
[ ! -f /home/persistant/ssh_host_dsa_key ] ||
[ ! -f /home/persistant/ssh_host_dsa_key.pub ]; then
# make sure none of the files still exists
[ -f /home/persistant/ssh_host_rsa_key ] || rm /home/persistant/ssh_host_rsa_key
[ -f /home/persistant/ssh_host_rsa_key.pub ] || rm /home/persistant/ssh_host_rsa_key
[ -f /home/persistant/ssh_host_dsa_key ] || rm /home/persistant/ssh_host_dsa_key
[ -f /home/persistant/ssh_host_dsa_key.pub ] || rm /home/persistant/ssh_host_dsa_key.pub
[ ! -f /home/persistant/ssh_host_rsa_key ] || rm /home/persistant/ssh_host_rsa_key
[ ! -f /home/persistant/ssh_host_rsa_key.pub ] || rm /home/persistant/ssh_host_rsa_key
[ ! -f /home/persistant/ssh_host_dsa_key ] || rm /home/persistant/ssh_host_dsa_key
[ ! -f /home/persistant/ssh_host_dsa_key.pub ] || rm /home/persistant/ssh_host_dsa_key.pub
echo -n "Generating ssh host key pairs:"
echo -n " rsa..."; /usr/bin/ssh-keygen -q -t rsa -f /home/persistant/ssh_host_rsa_key -C '' -N ''
echo -n " dsa..."; /usr/bin/ssh-keygen -q -t dsa -f /home/persistant/ssh_host_dsa_key -C '' -N ''