summaryrefslogtreecommitdiff
path: root/package/dropbear/files
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
commita377aa9ab534ed8fbbc6bbd867bfd66566da73ce (patch)
tree1524bfc4ecb86f4e12f4842dcf20e64fe4675bd1 /package/dropbear/files
parent59ff6c01d8581b8b787d6df3580bdcce96f17625 (diff)
downloadmtk-20170518-a377aa9ab534ed8fbbc6bbd867bfd66566da73ce.zip
mtk-20170518-a377aa9ab534ed8fbbc6bbd867bfd66566da73ce.tar.gz
mtk-20170518-a377aa9ab534ed8fbbc6bbd867bfd66566da73ce.tar.bz2
add dropkey ssh keys and config files to the conffiles section (#2014)
SVN-Revision: 14399
Diffstat (limited to 'package/dropbear/files')
-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 f671df7..aaa4470 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