Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Sep 2013 19:10:16 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Zeus Panchenko <zeus@ibs.dn.ua>
Cc:        freebsd-rc@freebsd.org
Subject:   Re: rc dependencies ...
Message-ID:  <52374988.7030901@infracaninophile.co.uk>
In-Reply-To: <20130916114741.99386@relay.ibs.dn.ua>
References:  <20130916114741.99386@relay.ibs.dn.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--3DLc8ee0JhmvQaRu5erpkD6fm0KmxSRPm
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 16/09/2013 09:47, Zeus Panchenko wrote:
> hi,
>=20
> please, help me to understand better scripts dependencies, how to make
> one rc script wait for other ...
>=20
> for my dhcpd configured with LDAP, I need to start=20
> /usr/local/etc/rc.d/isc-dhcpd=20
> only after=20
> /usr/local/etc/rc.d/slapd
>=20
> for what I edited /usr/local/etc/rc.d/isc-dhcpd
>=20
> --- isc-dhcpd~  2013-08-31 15:45:32.202899511 +0300
> +++ isc-dhcpd   2013-09-04 18:32:36.297221926 +0300
> @@ -3,7 +3,7 @@
>  # $FreeBSD: branches/RELENG_9_1_0/net/isc-dhcp42-server/files/isc-dhcp=
d.in 300897 2012-07-14 14:29:18Z beat $
>  #
>  # PROVIDE: dhcpd
> -# REQUIRE: DAEMON
> +# REQUIRE: DAEMON slapd
>  # BEFORE: LOGIN
>  # KEYWORD: shutdown
>  #
>=20
> but after reboot, dhcpd still complains:
> Sep 16 10:02:41 bo20 dhcpd: Error: Cannot start TLS session to foo.bar:=
389: Can't contact LDAP server
>=20
> when launched by hands, /usr/local/etc/rc.d/isc-dhcpd starts normally
>=20
>=20
> so, where is my mistake, why is it not waiting for /usr/local/etc/rc.d/=
slapd ?
>=20

You can force one daemon to start after another one without editing any
of the existing RC scripts (likely to get blown away when you update
that package) by adding an additional RC script like so:

#!/bin/sh
#
# Make isc-dhcpd start after slapd

# PROVIDE: precedence
# REQUIRE: slapd
# BEFORE: isc-dhcpd

Test the resulting startup order by:

  rcorder /etc/rc.d/* /usr/local/etc/rc.d/*

	Cheers,

	Matthew


--=20
Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew@infracaninophile.co.uk


--3DLc8ee0JhmvQaRu5erpkD6fm0KmxSRPm
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlI3SYgACgkQ8Mjk52CukIyWQACffoS8yP9LvCrC4DraskDf6AMr
aMsAoIlfoFu0y36LnUNfQcBrzS8d/0VH
=30X0
-----END PGP SIGNATURE-----

--3DLc8ee0JhmvQaRu5erpkD6fm0KmxSRPm--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52374988.7030901>