diff options
author | Bruce M Simpson <bms@FreeBSD.org> | 2004-05-20 11:16:06 +0000 |
---|---|---|
committer | Bruce M Simpson <bms@FreeBSD.org> | 2004-05-20 11:16:06 +0000 |
commit | 4692c8ea5435a4162a594b3688edae79ad797281 (patch) | |
tree | 6ad0979fd85bf2cfbf9ad937675b41b9e2107195 | |
parent | 3bf192995590cb27737eff17f0003d79216fde21 (diff) | |
download | freebsd-ports-4692c8ea5435a4162a594b3688edae79ad797281.zip |
Add a new rc variable, quagga_extralibs_path, to workaround boot-time
shared library dependencies. Directory paths listed in this variable
MUST belong to local filesystems.
When Quagga is compiled with additional libraries (e.g. net-snmp) it can
not start during system boot on -CURRENT because ldconfig is called after
NETWORKING; "REQUIRE ldconfig" cannot be used because /etc/rc.d/ldconfig
uses "REQUIRE mountcritremote" which requires NETWORKING.
Wordsmith some comments in the quagga.sh rcNG script.
Submitted by: Boris Kovalenko (with some cleanups)
-rw-r--r-- | net/quagga/Makefile | 7 | ||||
-rw-r--r-- | net/quagga/files/quagga.sh | 23 |
2 files changed, 23 insertions, 7 deletions
diff --git a/net/quagga/Makefile b/net/quagga/Makefile index 52ada15711b5..2f82894a9303 100644 --- a/net/quagga/Makefile +++ b/net/quagga/Makefile @@ -145,7 +145,12 @@ post-install: @${ECHO} "" @${ECHO} "defaultrouter=\"NO\"" @${ECHO} "quagga_enable=\"YES\"" - @${ECHO} "Also You may want to set router_enable=\"NO\"" + @${ECHO} "" + @${ECHO} "Also, you may wish to set the following options:" + @${ECHO} "quagga_daemons=\"zebra bgpd etc...\"" + @${ECHO} "quagga_flags=\"....\"" + @${ECHO} "quagga_extralibs_path=\"/path1 /path2\"" + @${ECHO} "router_enable=\"NO\"" @${ECHO} "" @${ECHO} "Note!!! Since 0.96.4_5 port uses new id for quagga user and group." @${ECHO} " So, You need to manually chown files:" diff --git a/net/quagga/files/quagga.sh b/net/quagga/files/quagga.sh index caef30d1d60a..66d72674a7fc 100644 --- a/net/quagga/files/quagga.sh +++ b/net/quagga/files/quagga.sh @@ -7,14 +7,17 @@ # KEYWORD: FreeBSD NetBSD # -# Add the following lines to /etc/rc.conf to enable quagga: -# +# Add the following line to /etc/rc.conf to enable quagga: #quagga_enable="YES" # -# You may also use next flags to tune startup +# You may also wish to use the following variables to fine-tune startup: #quagga_flags="-d" #quagga_daemons="zebra ripd ripng ospfd ospf6d bgpd isisd" # +# If the quagga daemons require additional shared libraries to start, +# use the following variable to run ldconfig(8) in advance: +#quagga_extralibs_path="/usr/local/lib ..." +# . %%RC_SUBR%% @@ -35,6 +38,7 @@ quagga_enable=${quagga_enable:-"NO"} quagga_flags=${quagga_flags:-"-d"} quagga_daemons=${quagga_daemons:-"zebra ripd ripng ospfd ospf6d bgpd isisd"} load_rc_config $name +quagga_extralibs_path=${quagga_extralibs_path:-""} quagga_cmd=$1 @@ -47,9 +51,16 @@ case "$1" in ;; esac -if [ ${quagga_cmd} = "stop" ]; then - quagga_daemons=$(reverse_list ${quagga_daemons}) -fi +case "${quagga_cmd}" in + start) + if [ ! -z ${quagga_extralibs_path} ]; then + /sbin/ldconfig -m ${quagga_extralibs_path} + fi + ;; + stop) + quagga_daemons=$(reverse_list ${quagga_daemons}) + ;; +esac for daemon in ${quagga_daemons}; do command=%%PREFIX%%/sbin/${daemon} |