aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorFlorent Thoumie <flz@FreeBSD.org>2005-03-09 16:58:31 +0000
committerFlorent Thoumie <flz@FreeBSD.org>2005-03-09 16:58:31 +0000
commit9950cafcdbd42fbb8918bc6984e43e554ba515e8 (patch)
treeb270de6674de1f3175e48e052ab78d8e395fb5f3 /net
parent19434ec1e8ac451a631f28a953793406682b6c7c (diff)
downloadports-9950cafcdbd42fbb8918bc6984e43e554ba515e8.tar.gz
ports-9950cafcdbd42fbb8918bc6984e43e554ba515e8.zip
Notes
Diffstat (limited to 'net')
-rw-r--r--net/quagga/Makefile43
-rw-r--r--net/quagga/files/quagga.sh.in (renamed from net/quagga/files/quagga.sh)0
-rw-r--r--net/quagga/files/watchquagga.sh.in (renamed from net/quagga/files/watchquagga.sh)0
-rw-r--r--net/quagga/pkg-plist4
4 files changed, 19 insertions, 28 deletions
diff --git a/net/quagga/Makefile b/net/quagga/Makefile
index 9bade5fabd5e..87b6d14502e7 100644
--- a/net/quagga/Makefile
+++ b/net/quagga/Makefile
@@ -135,29 +135,20 @@ CONFIGURE_ARGS+=--enable-tcp-signature
EXTRA_PATCHES+=${PATCHDIR}/extra-tcpmd5-patch-bgpd::bgp_network.c ${PATCHDIR}/extra-tcpmd5-patch-bgpd::bgp_vty.c ${PATCHDIR}/extra-tcpmd5-patch-bgpd::bgpd.c ${PATCHDIR}/extra-tcpmd5-patch-bgpd::bgpd.h ${PATCHDIR}/extra-tcpmd5-patch-configure.ac ${PATCHDIR}/extra-tcpmd5-patch-lib::sockopt.c ${PATCHDIR}/extra-tcpmd5-patch-lib::sockopt.h
.endif
-.if ${OSVERSION} >= 500038
-RC_SUBR?= ${DESTDIR}/etc/rc.subr
-RC_DIR= ${DESTDIR}/etc/rc.d
-RC_SUFX=
+USE_RC_SUBR= watchquagga.sh
+.if ${OSVERSION} < 500000
+USE_RC_SUBR+= quagga.sh
.else
-USE_RC_SUBR= yes
-RC_DIR= ${PREFIX}/etc/rc.d
-RC_SUFX= .sh
+USE_RCORDER= quagga.sh
.endif
-SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
- -e 's,%%SYSCONF_DIR%%,${SYSCONF_DIR},g' \
- -e 's,%%LOCALSTATE_DIR%%,${LOCALSTATE_DIR},g' \
- -e 's,%%RC_SUBR%%,${RC_SUBR},g' \
- -e 's,%%RC_DIR%%,${RC_DIR},g' \
- -e 's,%%RC_SUFX%%,${RC_SUFX},g'
+SUB_LIST+= LOCALSTATE_DIR=${LOCALSTATE_DIR} \
+ SYSCONF_DIR=${SYSCONF_DIR}
-PLIST_SUB+= RC_DIR=${RC_DIR} \
- RC_SUFX=${RC_SUFX} \
- LOCALSTATE_DIR=${LOCALSTATE_DIR} \
+PLIST_SUB+= LOCALSTATE_DIR=${LOCALSTATE_DIR} \
+ SYSCONF_DIR=${SYSCONF_DIR} \
ENABLE_USER=${ENABLE_USER} \
- ENABLE_GROUP=${ENABLE_GROUP} \
- CWD_TRICK=${PREFIX}
+ ENABLE_GROUP=${ENABLE_GROUP}
pre-everything::
@${ECHO} "============================================================="
@@ -180,15 +171,9 @@ pre-everything::
@${ECHO} " WITH_TCPSOCKETS Use TCP/IP sockets for protocol daemons"
@${ECHO} " WITH_TCPMD5 Use experimental MD5 patch for BGP"
-post-build:
- @${SED} ${SED_SCRIPT} ${FILESDIR}/quagga.sh > ${WRKDIR}/quagga.sh
- @${SED} ${SED_SCRIPT} ${FILESDIR}/watchquagga.sh > ${WRKDIR}/watchquagga.sh
-
post-install:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO} "===> installing ${PORTNAME} startup file..."
- @${INSTALL_SCRIPT} ${WRKDIR}/quagga.sh ${RC_DIR}/quagga${RC_SUFX}
- @${INSTALL_SCRIPT} ${WRKDIR}/watchquagga.sh ${RC_DIR}/watchquagga${RC_SUFX}
@${ECHO} "Add the following lines to /etc/rc.conf to enable quagga:"
@${ECHO} ""
@${ECHO} "defaultrouter=\"NO\""
@@ -218,6 +203,16 @@ post-install:
@${ECHO} " device cryptodev"
@${ECHO} ""
.endif
+.if ${OSVERSION} < 500000
+ @${ECHO} "Warning: You are running 4.x version of FreeBSD. To properly start"
+ @${ECHO} " quagga on your system please rename"
+ @${ECHO} " ${PREFIX}/etc/rc.d/quagga.sh to something like"
+ @${ECHO} " ${PREFIX}/etc/rc.d/010.quagga.sh or even You"
+ @${ECHO} " should write your own startup script and use it with"
+ @${ECHO} " router_enable=\"YES\""
+ @${ECHO} " router=\"your_startup_script_here\" in your rc.conf"
+ @${ECHO} ""
+.endif
.if !defined(BATCH)
post-clean:
diff --git a/net/quagga/files/quagga.sh b/net/quagga/files/quagga.sh.in
index e8231d51da9b..e8231d51da9b 100644
--- a/net/quagga/files/quagga.sh
+++ b/net/quagga/files/quagga.sh.in
diff --git a/net/quagga/files/watchquagga.sh b/net/quagga/files/watchquagga.sh.in
index 3545ecdd6f49..3545ecdd6f49 100644
--- a/net/quagga/files/watchquagga.sh
+++ b/net/quagga/files/watchquagga.sh.in
diff --git a/net/quagga/pkg-plist b/net/quagga/pkg-plist
index 2fdffbcab82b..c42f1b412e9c 100644
--- a/net/quagga/pkg-plist
+++ b/net/quagga/pkg-plist
@@ -77,8 +77,4 @@ include/quagga/zebra.h
@dirrm include/quagga
@dirrm share/examples/quagga
@dirrm etc/quagga
-@cwd %%RC_DIR%%
-quagga%%RC_SUFX%%
-watchquagga%%RC_SUFX%%
-@cwd %%CWD_TRICK%%
@unexec rmdir %%LOCALSTATE_DIR%% 2>/dev/null || true