Subject: Re: rc.d: client-server dependencies
To: Mike M. Volokhov <mishka@NetBSD.org>
From: John Nemeth <jnemeth@victoria.tc.ca>
List: tech-userlevel
Date: 08/15/2006 04:12:48
On Jan 5,  5:34am, "Mike M. Volokhov" wrote:
} Geert Hendrickx <ghen@NetBSD.org> wrote:
} > 
} > 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).

     This problem can be solved by putting "# BEFORE: upsmon" in
/etc/rc.d/upsd, and removing the "# REQUIRE: upsd" from
/etc/rc.d/upsmon.  This way you can run upsmon without upsd, but if you
do use upsd, you are guaranteed that it will start before upsmon.

} 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.

     The ups-nut package can be fixed as above.

     As for the PR, since you're a developer now, why don't you commit
the patch?  If you don't feel comfortable doing it, ask your sponsor or
lukem for advice.

}-- End of excerpt from "Mike M. Volokhov"