]> git.pld-linux.org Git - packages/openssh.git/commitdiff
sshd initscript: do not rely only on lock file
authorElan Ruusamäe <glen@delfi.ee>
Tue, 7 Apr 2015 10:20:38 +0000 (13:20 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Tue, 7 Apr 2015 10:20:38 +0000 (13:20 +0300)
OpenSSH service is already running.
daemon sshd dead but subsys (sshd) locked

basically main pid is down, but lockfile exists.
making exception to sshd (being important service) to not to rely only
on lockfile.

opensshd.init

index f78007ea96c8d3fdd3c35bbb30f7033d6bc63f9d..3b963d7c3e4f945ee56166bfe39946a80a29901e 100755 (executable)
@@ -51,7 +51,7 @@ ssh_gen_keys() {
 
 start() {
        # Check if the service is already running?
-       if [ -f /var/lock/subsys/sshd ]; then
+       if status >/dev/null; then
                msg_already_running "OpenSSH"
                return
        fi
This page took 0.20005 seconds and 4 git commands to generate.