fix permission issue, /var/empty needs to have the right perms
[openwrt/svn-archive/archive.git] / net / openssh / files / sshd.init
index c2e535d311d7c194c38070f7020991ce6632d136..a616306becb6e593f373e69252cd15ca79f17f63 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh /etc/rc.common
 # Copyright (C) 2006 OpenWrt.org
+START=50
 
 start() {
        for type in rsa dsa; do {
@@ -8,12 +9,13 @@ start() {
                [ ! -f $key ] && {
                        # generate missing keys
                        [ -x /usr/bin/ssh-keygen ] && {
-                               /usr/bin/ssh-keygen -N '' -t $type -f $key 2>&- >&- && exec $0 $*
+                               /usr/bin/ssh-keygen -N '' -t $type -f $key 2>&- >&- && exec /etc/rc.common "$initscript" start
                        } &
                        exit 0
                }
        }; done
        mkdir -p /var/empty
+       chmod 0700 /var/empty
        /usr/sbin/sshd
 }