Subject: Re: Writing my own script for /etc/rc.d
To: None <netbsd-users@netbsd.org>
From: Benjamin Walkenhorst <krylon@gmx.net>
List: netbsd-users
Date: 01/03/2004 14:25:23
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday 02 January 2004 07:03, Christian Biere wrote:
> Benjamin Walkenhorst wrote:
> > Now I am growing tired of that and would like to control goldbach
> > via rc.conf.
>
> Isn't it far easier to add a cron-job with "@reboot" for this?=20
Thank you, that's a very good idea.=20
On the other hand I wanted to learn a little about writing rc-scripts.
> And do
> you really want to run your program as root from a user-owned
> directory?
On the one hand, there's not really a problem with that: The program is=20
not doing anything that might be harmful to the system, and I am the=20
only user. Incoming connections are allowed from my desktop machine=20
exclusively. So I am not worried about security issues here.
On the other hand, running the program as a non-privileged user is more=20
elegant. ;-) So I would like to do this, too.=20
But I think this can be done via rc-scripts, too - pgsql does it, for=20
example. But I don't know how to do this.
I set the control-script to suid already, I added a line=20
goldbach_user=3D"krylon"
to /etc/rc.d/goldbach, but it did not work. (I found a similar line in=20
/usr/pkg/etc/rc.d/pgsgql).
Any hints? =3D)
Thank you very much,
Benjamin
- --=20
Benjamin Walkenhorst
eMail: krylon@gmx.net
http://www.krylon.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
iD8DBQE/9sLJ/JWwsvZUqOwRAhkOAKCAVIPyrt/emmxo8jHpotIwTZPukwCfeUf1
OAjWule6AK57087AUDmGVjU=3D
=3Df0AQ
-----END PGP SIGNATURE-----