X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/a0c642f00af976e7ff77f4f479bc751fcb362039..29ec5d802c648afb89dd4f326bc4752f40ad7416:/package/dropbear/files/dropbear.init diff --git a/package/dropbear/files/dropbear.init b/package/dropbear/files/dropbear.init index b629c1e48..aaa447043 100755 --- a/package/dropbear/files/dropbear.init +++ b/package/dropbear/files/dropbear.init @@ -1,5 +1,6 @@ #!/bin/sh /etc/rc.common # Copyright (C) 2006 OpenWrt.org +START=50 # Copyright (C) 2006 Carlos Sobrinho config_cb() { @@ -25,7 +26,7 @@ keygen() { for keytype in rsa dss; do # check for keys key=dropbear/dropbear_${keytype}_host_key - [ -f /tmp/$key -o -f /etc/$key ] || { + [ -f /tmp/$key -o -s /etc/$key ] || { # generate missing keys mkdir -p /tmp/dropbear [ -x /usr/bin/dropbearkey ] && { @@ -44,8 +45,8 @@ keygen() { } start() { - [ -f /etc/dropbear/dropbear_rsa_host_key -a \ - -f /etc/dropbear/dropbear_dss_host_key ] || keygen + [ -s /etc/dropbear/dropbear_rsa_host_key -a \ + -s /etc/dropbear/dropbear_dss_host_key ] || keygen config_load dropbear /usr/sbin/dropbear $DROPBEAR_ARGS