* Summary: sshd won't start from rc3.d
@ 1999-05-17 21:10 richard n. frank
0 siblings, 0 replies; only message in thread
From: richard n. frank @ 1999-05-17 21:10 UTC (permalink / raw)
To: tru64-unix-managers
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-05-17 21:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-05-17 21:10 Summary: sshd won't start from rc3.d richard n. frank
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox