tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "richard n. frank" <rnfrank () wolfram ! llnl ! gov>
To: tru64-unix-managers
Subject: Summary: sshd won't start from rc3.d
Date: Mon, 17 May 1999 21:10:29 +0000	[thread overview]
Message-ID: <96079042215772.tru64-unix-managers.marc@archive.invalid> (raw)

Many thanks to:

John P Speno <speno@isc.upenn.edu>
Steve VanDevender <stevev@hexadecimal.uoregon.edu>
"Sean O'Connell" <sean@stat.Duke.EDU>
"Jeff Berliner" <jeff@endeavor.med.nyu.edu>
Graham Allan <ALLAN@mnhep1.hep.umn.edu>
Don Becker <becker@adelphi.edu>
"Brian Parkhurst" <brianp@u.washington.edu>
"Skeate, Scott B" <scott.b.skeate@lmco.com>
Paul Scowen <paul.scowen@asu.edu>
"Serguei Patchkovskii" <patchkov@ucalgary.ca>
Paul A Sand <pas@unh.edu>
and last but not least
"Dr. Tom Blinn, 603-884-0646" <tpb@doctor.zk3.dec.com>
-----------------------------------------------------------
The problem was I was linking from rc3.d to the executable itself 
rather than linking to a script which will start or stop the daemon.

Steve VanDevender provided this detailed explanation and script. Many
of the experts responding provided similar scripts and explanations.
------------------------------------------------------------------
Steve VanDevender:

>... That's probably because init scripts are not supposed to be links
>directly to the binaries they start.  Init scripts are expected
>to be shell scripts called with the argument "start" on system
>boot and with "stop" on system shutdown.
>
>I suggest using an init script like this to start sshd; it's
>based on a similar existing script.  You would put this in
>/sbin/init.d/sshd and then make the symlink from
>/sbin/init.d/rc3.d/S97sshd to it:
>
>#!/sbin/sh
>
>PATH=/sbin:/usr/sbin:/usr/bin
>export PATH
>
>case "$1" in
>'start')
>	if [ -f /usr/local/sbin/sshd ]; then
>		/usr/local/sbin/sshd
>		echo "ssh service started"
>	else
>		echo "Unable to start ssh service -- no /usr/local/sbin/sshd"
>		exit 1
>	fi
>	;;
>'stop')
>	pid=`cat /var/run/sshd.pid`
>	if [ "X$pid" != "X" ]; then
>		/bin/kill $pid
>	else
>		echo "No pid for ssh service found"
>		exit 1
>	fi
>	;;
>'restart')
>	/sbin/init.d/sshd stop
>	if [ $? -ne 0 ]; then
>		echo "  -- Could not find running sshd - attempting to restart..."
>	fi
>	sleep 2
>	/sbin/init.d/sshd start
>	;;
>*)
>	echo "usage: $0 {start|stop|restart}"
>	;;
>esac
>
-----------------------------------------------------------

A thousand thanks to all and a lesson learned for me.
       
                                                       rich frank
                                                       rnfrank@llnl.gov

                 reply	other threads:[~1999-05-17 21:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox