aboutsummaryrefslogtreecommitdiffstats
path: root/package/dropbear/files/dropbear.init
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2009-02-03 22:28:16 +0000
committerFlorian Fainelli <florian@openwrt.org>2009-02-03 22:28:16 +0000
commitb069e77e4e43c70949efd0dc0c2595e14499ac75 (patch)
treedb8798f404d37b2bb0e018d344840764b4a0271f /package/dropbear/files/dropbear.init
parent7e95fd1f09a58f5cb87ef586b212ee4bdd18fbf3 (diff)
downloadupstream-b069e77e4e43c70949efd0dc0c2595e14499ac75.tar.gz
upstream-b069e77e4e43c70949efd0dc0c2595e14499ac75.tar.bz2
upstream-b069e77e4e43c70949efd0dc0c2595e14499ac75.zip
[package] add dropkey ssh keys and config files to the conffiles section (#2014)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14399 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/dropbear/files/dropbear.init')
-rwxr-xr-xpackage/dropbear/files/dropbear.init6
1 files changed, 3 insertions, 3 deletions
diff --git a/package/dropbear/files/dropbear.init b/package/dropbear/files/dropbear.init
index f671df787e..aaa4470432 100755
--- a/package/dropbear/files/dropbear.init
+++ b/package/dropbear/files/dropbear.init
@@ -26,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 ] && {
@@ -45,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