The ChangeLog indicates: 19991113 [...] - Revised Redhat initscript to fix bug: sshd (re)start would fail if executed from inside a ssh login. Unfortunately, the changes made to the init script make it no longer work on a Red Hat Linux 4.x or 5.x system, which doesn't use the `success' or `failure' functions available in Red Hat Linux 6.x. The attached patch enables the script to work in either environment by checking for the existence of the `success' shell function. -- jim knoble jmknoble at pobox.com -------------- next part -------------- --- ./packages/redhat/sshd.init.orig-init Mon Nov 22 18:11:29 1999 +++ ./packages/redhat/sshd.init Sun Dec 5 02:06:27 1999 @@ -21,8 +21,16 @@ start) echo -n "Starting sshd: " if [ ! -f /var/run/sshd.pid ] ; then - /usr/sbin/sshd && success "sshd startup" || failure "sshd startup" - RETVAL=$? + case "`type -type success`" in + function) + /usr/sbin/sshd && success "sshd startup" || failure "sshd startup" + RETVAL=$? + ;; + *) + /usr/sbin/sshd && echo -n "sshd " + RETVAL=$? + ;; + esac fi echo ;;
On Sun, 5 Dec 1999, Jim Knoble wrote:> The ChangeLog indicates: > > 19991113 > [...] > - Revised Redhat initscript to fix bug: sshd (re)start would fail > if executed from inside a ssh login. > > Unfortunately, the changes made to the init script make it no longer > work on a Red Hat Linux 4.x or 5.x system, which doesn't use the > `success' or `failure' functions available in Red Hat Linux 6.x. > > The attached patch enables the script to work in either environment by > checking for the existence of the `success' shell function.Applied. Thanks, Damien Miller -- | "Bombay is 250ms from New York in the new world order" - Alan Cox | Damien Miller - http://www.mindrot.org/ | Email: djm at mindrot.org (home) -or- djm at ibs.com.au (work)