From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079042215772.tru64-unix-managers.marc@archive.invalid> From: "richard n. frank" Date: Mon, 17 May 1999 21:10:29 +0000 To: tru64-unix-managers Subject: Summary: sshd won't start from rc3.d X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079042215772 Many thanks to: John P Speno Steve VanDevender "Sean O'Connell" "Jeff Berliner" Graham Allan Don Becker "Brian Parkhurst" "Skeate, Scott B" Paul Scowen "Serguei Patchkovskii" Paul A Sand and last but not least "Dr. Tom Blinn, 603-884-0646" ----------------------------------------------------------- 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