From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <98349287000656.tru64-unix-managers.marc@archive.invalid> From: bac Date: Fri, 02 Mar 2001 00:27:37 +0000 To: tru64-unix-managers Subject: SUMMARY: SSH/Startup X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=98349287000656 Thanks to: Ian Mortimer Gregory Patrick Rudd Paul A Sand The following script by Paul A Sand works perfectly: > > I don't know about `best', but we have this in > /sbin/init.d/sshd: > > #!/sbin/sh > PATH=/sbin:/usr/sbin:/usr/bin > export PATH > > case "$1" in > 'start') > set `who -r` > if [ $9 = "S" ]; then > if /usr/local/sbin/sshd; then > echo "sshd started" > fi > fi > ;; > 'stop') > /bin/kill `cat /var/run/sshd.pid` > ;; > *) > echo "usage: $0 {start|stop}" > ;; > esac > > And /sbin/rc3.d/S93sshd is a symlink to this. Hope > this helps. Ian also gave the following suggestion, which I didn't get a chance to try: Copy the script below to /sbin/init.d/sshd. Do: /sbin/init.d/sshd start /sbin/init.d/sshd status /sbin/init.d/sshd stop /sbin/init.d/sshd status to confirm that the script works. Then do: chmod 750 /sbin/init.d/sshd cd /sbin/rc3.d ln -s ../init.d/sshd S97sshd # 97 is arbitrary - choose your own order cd /sbin/rc2.d ln -s ../init.d/sshd K97sshd # 97 is arbitrary - choose your own order cd /sbin/rc0.d ln -s ../init.d/sshd K97sshd # 97 is arbitrary - choose your own order It should then start in level 3 and shut down if you switch to level 2 or 0. Ian __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/