[packages/openssh] sshd initscript: do not rely only on lock file

glen glen at pld-linux.org
Tue Apr 7 12:22:24 CEST 2015


commit aea98ff170da981791b3488abcf51314c6cafb75
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Apr 7 13:20:38 2015 +0300

    sshd initscript: do not rely only on lock file
    
    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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/opensshd.init b/opensshd.init
index f78007e..3b963d7 100755
--- a/opensshd.init
+++ b/opensshd.init
@@ -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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/openssh.git/commitdiff/aea98ff170da981791b3488abcf51314c6cafb75



More information about the pld-cvs-commit mailing list