Subject: Re: rc.d: client-server dependencies
To: Geert Hendrickx <ghen@NetBSD.org>
From: Mike M. Volokhov <mishka@netbsd.org>
List: tech-userlevel
Date: 08/15/2006 10:58:35
[This message was moved from tech-pkg@. Please direct your replies to
tech-userlevel@@. Sorry for inconvenience.]

Geert Hendrickx <ghen@NetBSD.org> wrote:
> Hi, 
> 
> I'm playing around with sysutils/ups-nut, a collection of networked UPS
> tools.  There's a client upsmon which connects to a server upsd, either
> locally or over the network.  The rc.d script for upsmon has: 
> 
> # PROVIDE: upsmon
> # REQUIRE: upsd
> 
> As a consequence, when running "/etc/rc.d/upsmon start" on a client-only
> machine (where upsd runs on a different machine), it says: 
> 
> WARNING: $upsmon is not set properly - see rc.conf(5).

There is another problem with such setup - rcorder(8) will not find upsd
via dependency list (real message may be different):

	rcorder: requirement `upsd' in file `upsmon' has no providers.

To solve this you need fake upsd script, or implemented optional dependency,
like in bin/25785.

--
Mishka

[1] http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=25785