openssh: check for files if they exist and not empty

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-12-05 15:55:37 +01:00
parent 9ee7725a88
commit e51428321c

View File

@ -31,7 +31,7 @@
SSHD="/usr/sbin/sshd"
# Check for the SSH1 RSA key
if [ ! -f $RSA1_KEY ] ; then
if [ ! -s $RSA1_KEY ] ; then
progress "SSH: generating SSH1 RSA key"
mkdir -p /storage/.cache/ssh
@ -40,7 +40,7 @@
fi
# Check for the SSH2 RSA key
if [ ! -f $RSA2_KEY ] ; then
if [ ! -s $RSA2_KEY ] ; then
progress "SSH: generating SSH2 RSA key"
mkdir -p /storage/.cache/ssh
@ -49,7 +49,7 @@
fi
# Check for the SSH2 DSA key
if [ ! -f $DSA2_KEY ] ; then
if [ ! -s $DSA2_KEY ] ; then
progress "SSH: generating SSH2 DSA key"
mkdir -p /storage/.cache/ssh