Subject: Re: Adding sshd to rc.local
To: None <port-mac68k@netbsd.org>
From: Matthew Theobalds <mtheobalds@mac.com>
List: port-mac68k
Date: 04/20/2001 23:06:57
On Friday, April 20, 2001, at 10:35  pm, Dave Huang wrote:

> On Fri, 20 Apr 2001, Matthew Theobalds wrote:
>> Since I don't like restarting, and if I'm removing it from the crontab,
>> I want to be sure it's right; could someone confirm that merely adding
>> this to rc.local will work nicely?
>>
>> 	if [ -x /usr/sbin/sshd ]; then
>> 		/usr/sbin/sshd;
>> 		echo 'Starting sshd. Hang tight.';
>> 	fi
>
> The semicolons inside the "if" block are redundant... they shouldn't
> cause any problems though. You do need the semicolon after the "]' on
> the "if" line. Also, you should do the "echo" before sshd, not after.

I like semicolons, they keep everything nice and tidy in code, I think. 
Yes, I forgot that it seemed silly to put the 'Starting...' after the 
event. Thanks very much for the confirmation, Dave, one does indeed 
learn many things everyday. Much appreciated.

> However, couldn't you just say "sshd=YES" in your /etc/rc.conf file and
> let /etc/rc/sshd take care of everything? (Assuming this is NetBSD 1.5,
> but since you have a /usr/sbin/sshd, it probably is :)

There is definitely more than one way to skin a cat, and the easiest way 
is found on the NetBSD/mac68k mailing list. This was also what I was 
looking for!

All the best.

Matthew