[2.2.0p1] unable to restart sshd remotely

Damien Miller djm at mindrot.org
Sun Sep 3 19:18:03 EST 2000


On Sat, 2 Sep 2000, MICHAEL SUN wrote:

> after I check sshd.init file, I found:
> you use 'daemon' function to start sshd.
> 
> but 'daemon' will not start a daemon if the daemon process already
> exist, isn't it right?

Yes. This patch should fix it, as will the updated RPMs that I am 
uploading now.

Thanks,
Damien Miller

diff -u -r1.2 -r1.3
--- contrib/redhat/sshd.init	2000/08/08 06:53:28	1.2
+++ contrib/redhat/sshd.init	2000/09/03 08:14:58	1.3
@@ -57,9 +57,14 @@
 		
 		echo -n "Starting sshd: "
 		if [ ! -f $PID_FILE ] ; then
-			daemon sshd
+			sshd
 			RETVAL=$?
-			touch /var/lock/subsys/sshd
+			if [ "$RETVAL" = "0" ] ; then
+				success "sshd startup"
+				touch /var/lock/subsys/sshd
+			else
+				failure "sshd startup"
+			fi
 		fi
 		echo
 		;;

-d

-- 
| ``The power of accurate observation is  | Damien Miller <djm at mindrot.org>
| commonly called cynicism by those who   | @Work <djm at ibs.com.au>
| have not got it'' - George Bernard Shaw | http://www.mindrot.org






More information about the openssh-unix-dev mailing list