aboutsummaryrefslogtreecommitdiffstats
path: root/net/quagga
diff options
context:
space:
mode:
authorflz <flz@FreeBSD.org>2005-03-10 00:58:31 +0800
committerflz <flz@FreeBSD.org>2005-03-10 00:58:31 +0800
commit217071f3b52db471c902d93729cf502e1284ffef (patch)
treeaeee5898248f28e05909ef17a6732898367ffe44 /net/quagga
parent55d8b87803293dd0dbdbb664ecc8301e60ec6503 (diff)
downloadfreebsd-ports-gnome-217071f3b52db471c902d93729cf502e1284ffef.tar.gz
freebsd-ports-gnome-217071f3b52db471c902d93729cf502e1284ffef.tar.zst
freebsd-ports-gnome-217071f3b52db471c902d93729cf502e1284ffef.zip
- Make use of USE_RCORDER.
PR: ports/78614 Submitted by: Boris Kovalenko <boris@tagnet.ru> (maintainer) Approved by: pav (mentor)
Diffstat (limited to 'net/quagga')
-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