tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: SSH/Startup
@ 2001-03-02  0:27 bac
  0 siblings, 0 replies; only message in thread
From: bac @ 2001-03-02  0:27 UTC (permalink / raw)
  To: tru64-unix-managers

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/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-03-02  0:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-02  0:27 SUMMARY: SSH/Startup bac

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