Subject: Re: ups-nut rc.d scripts
To: Johnny Lam <firstname.lastname@example.org>
From: Luke Mewburn <email@example.com>
Date: 11/21/2001 15:28:30
On Tue, Nov 20, 2001 at 07:55:32PM -0800, Johnny Lam wrote:
> The ups-nut design has changed, and I think the recommended way to start
> and stop the drivers now is through "upsdrvctl start|stop". If we use
> upsdrvctl, then we don't need to figure out the pidfile name as it's
> taken care of by the program.
That makes sense. I'll update my version and resubmit.
> taken care of by the program. Using the argument as to why nmbd and smbd
> in net/samba should be controlled by the same script, I argue that the the
> UPS driver programs and upsd should be controlled by the same script: it
> doesn't make sense to start one without the other.
As the author of the rc.d stuff, I disagree (but that doesn't mean that
you're not entitled to your opinion!)
a) My local rc.d/samba script starts both smbd and nmbd at once,
because I see them as `tightly coupled'; you really don't run one
without the other, nor manipulate one without the other).
At the time, that seemed like a good idea (similar to
/etc/rc.d/nfslocking), but I am leaning now to the idea of
providing separate nmbd and smbd scripts that do the work, and a
`master' samba script which has 'KEYWORDS: nostart' for
b) In my testing of updating the ups-nut package, using the rc.d
script which starts 3 services caused me no end of grief,
especially when upsd wouldn't start because it couldn't bind to
the socket (waiting for CLOSE_WAIT?). Having the ability to
manually bounce upsd (for example) is useful.
In summary, ups-nut should install:
/usr/pkg/etc/rc.d/upsdrvctl manage ups driver
/usr/pkg/etc/rc.d/upsd manage upsd
/usr/pkg/etc/rc.d/upsmon manage upsmon
/usr/pkg/etc/rc.d/upslog manage upslog
/usr/pkg/etc/rc.d/ups front-end for the above for
sysadmin convenience - not run
by /etc/rc at startup
On another note, I don't believe that package installs should put stuff
in /etc/rc.d. I strongly prefer that package rc.d scripts install into
/usr/pkg/etc/rc.d, and then reminding the admin to manually install the
rc.d scripts into /etc/rc.d.
Luke Mewburn <firstname.lastname@example.org> http://www.wasabisystems.com
Luke Mewburn <email@example.com> http://www.netbsd.org
Wasabi Systems - NetBSD hackers for hire
NetBSD - the world's most portable UNIX-like operating system