From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653755322186.tru64-unix-managers.marc@archive.invalid> From: Pascal Robert Date: Wed, 03 Apr 2002 18:30:12 +0000 To: tru64-unix-managers Subject: SUMMARY: SSH not starting up at boot X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653755322186 Thanks to a lot of people, especially Robert M. Lang, it works with the following script. I also renamed S99ssh to S99sshd (added a 'd' at the end). #!/bin/sh # # 1999/06/20, by keisukeh # # # Startup for Sshd Daemon # case $1 in 'start') if [ -f /usr/local/sbin/sshd ]; then echo "starting SSHD daemon" /usr/local/sbin/sshd & fi ;; 'stop') PID=`/usr/bin/ps -e -u 0|/usr/bin/fgrep sshd|/usr/bin/awk '{print $1}'` if [ ! -z "$PID" ] ; then /usr/bin/kill ${PID} 1>/dev/null 2>&1 fi ;; *) echo "Usage: /etc/rc2.d/S99sshd { start | stop }" ;; esac exit 0 ------ Forwarded Message > From: Pascal Robert > Followup-To: poster > Date: Tue, 02 Apr 2002 09:11:15 -0500 > To: tru64-unix-managers@ornl.gov > Subject: SSH not starting up at boot > > Hi list, > > I installed OpenSSH 2.9.9p2 (will update to 3.x soon) on a Alpha Server 800. > I created a startup script in /sbin/init.d called 'sshd' but when the server > reboot, sshd is not started. BUT if I start it manually after boot ('sh > /sbin/init.d/sshd start'), it do work. Anything missing ? > > Permissions on script is: > > # ls -l /sbin/init.d/sshd > -rwxr-x--- 1 bin bin 416 Apr 2 09:06 /sbin/init.d/sshd > > Script code: > > # > #!/sbin/sh > # > > PATH=/sbin:/usr/sbin:/usr/bin > export PATH > KILL="/bin/kill" > > Pid=`/sbin/init.d/bin/psmgetpid sshd` > > case "$1" in > 'start') > if /usr/sbin/sshd ; then > echo "SSHD started" > else > echo "Cannot start SSHD" > fi > ;; > 'stop') > if [ "X$Pid" != "X" ]; then > $KILL $Pid > fi > ;; > *) > echo "usage: $0 {start|stop}" > ;; > Esac > ------ End of Forwarded Message