Subject: Re: Writing my own script for /etc/rc.d
To: Benjamin Walkenhorst <krylon@gmx.net>
From: Chris Pinnock <cjep@fawlty.net>
List: netbsd-users
Date: 01/01/2004 15:37:56
On Thu, Jan 01, 2004 at 04:31:49PM +0100, Benjamin Walkenhorst wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello everybody,
>
> When I started learning C (about three and a half years ago), one of the
> programs I wrote was for checking the Goldbach-assumption. It says that
> for every even number >= 4 can be shown to be the sum of two prime
> numbers.
> As far as I know Goldbach so far has neither been shown to be right or
> wrong. And the only way to do so I could think of - being no
> mathematician - is to check every even number >= 4.
> More than three years later, my C is still very poor. =) But recently I
> started to care again and rewrote the program.
You can never possibly check every even number >=4 due to time constraints,
but you may be able to find a counterexample using your method (if one
exists - AFAIK one has not been found).
>
> Now I would like to run the program on my NetBSD-box (which I use as a
> small home server and ipnat-gateway). In fact I have done so for quite
> some time, but so far I've been controlling it manually.
> Now I am growing tired of that and would like to control goldbach via
> rc.conf. So I looked up what other scripts in /etc/rc.d look like and
> wrote a script that I thought looked quite reasonable. =) I copied it
> to /etc/rc.d, made it executable and addded "goldbach=YES" to rc.conf.
> Yet, nothing happens.
> The script looks like this:
Does "/etc/rc.d/goldbach start" work manually?