rpms/openssh/devel openssh.spec,1.168,1.169 sshd.init,1.3,1.4

Jan F. Chadima jfch2222 at fedoraproject.org
Thu Sep 24 16:05:27 UTC 2009


Author: jfch2222

Update of /cvs/pkgs/rpms/openssh/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14867

Modified Files:
	openssh.spec sshd.init 
Log Message:
Repair initscript to be acord to guidelines



Index: openssh.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openssh/devel/openssh.spec,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -p -r1.168 -r1.169
--- openssh.spec	24 Sep 2009 12:34:15 -0000	1.168
+++ openssh.spec	24 Sep 2009 16:05:26 -0000	1.169
@@ -63,7 +63,7 @@
 Summary: An open source implementation of SSH protocol versions 1 and 2
 Name: openssh
 Version: 5.2p1
-Release: 27%{?dist}%{?rescue_rel}
+Release: 28%{?dist}%{?rescue_rel}
 URL: http://www.openssh.com/portable.html
 #Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz
 #Source1: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz.asc
@@ -466,7 +466,7 @@ fi
 %endif
 
 %changelog
-* Thu Sep 24 2009 Jan F. Chadima <jchadima at redhat.com> - 5.2p1-27
+* Thu Sep 24 2009 Jan F. Chadima <jchadima at redhat.com> - 5.2p1-28
 - Repair initscript to be acord to guidelines (#521860)
 - Add bugzilla# to application of edns and xmodifiers patch
 


Index: sshd.init
===================================================================
RCS file: /cvs/pkgs/rpms/openssh/devel/sshd.init,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- sshd.init	24 Sep 2009 12:34:16 -0000	1.3
+++ sshd.init	24 Sep 2009 16:05:27 -0000	1.4
@@ -107,7 +107,7 @@ do_restart_sanity_check()
 {
 	$SSHD -t
 	RETVAL=$?
-	if [ ! "$RETVAL" = 0 ]; then
+	if [ $RETVAL -ne  0 ]; then
 		failure $"Configuration file or keys are invalid"
 		echo
 	fi
@@ -127,7 +127,7 @@ start()
 	echo -n $"Starting $prog: "
 	$SSHD $OPTIONS && success || failure
 	RETVAL=$?
-	[ "$RETVAL" = 0 ] && touch $lockfile
+	[ $RETVAL -eq 0 ] && touch $lockfile
 	echo
 	return $RETVAL
 }
@@ -148,7 +148,7 @@ stop()
 	    killall $prog 2>/dev/null
 	    trap TERM
 	fi
-	[ "$RETVAL" = 0 ] && rm -f $lockfile
+	[ $RETVAL -eq 0 ] && rm -f $lockfile
 	echo
 }
 
@@ -174,7 +174,7 @@ force_reload() {
 }
 
 rh_status() {
-	status -p $PID_FILE $prog	#openssh-daemon
+	status -p $PID_FILE openssh-daemon
 }
 
 rh_status_q() {
@@ -187,7 +187,10 @@ case "$1" in
 		start
 		;;
 	stop)
-		rh_status_q || exit 0
+		if ! rh_status_q; then
+			rm -f $lockfile
+			exit 0
+		fi
 		stop
 		;;
 	restart)
@@ -200,16 +203,11 @@ case "$1" in
 	force-reload)
 		force_reload
 		;;
-	condrestart)
-		if [ -f /var/lock/subsys/$prog ]; then
-		    	restart
-		fi
-		;;
-	try-restart)
+	condrestart|try-restart)
 		rh_status_q || exit 0
 		if [ -f $lockfile ] ; then
 			do_restart_sanity_check
-			if [ "$RETVAL" = 0 ] ; then
+			if [ $RETVAL -eq 0 ] ; then
 				stop
 				# avoid race
 				sleep 3
@@ -222,6 +220,9 @@ case "$1" in
 	status)
 		rh_status
 		RETVAL=$?
+		if [ $RETVAL -eq 3 -a -f $lockfile ] ; then
+			RETVAL=2
+		fi
 		;;
 	*)
 		echo $"Usage: $0 {start|stop|restart|reload|force-reload|condrestart|try-restart|status}"




More information about the fedora-extras-commits mailing list