aboutsummaryrefslogtreecommitdiff
path: root/net/generic-nqs
diff options
context:
space:
mode:
authorShaun Amott <shaun@FreeBSD.org>2006-08-25 01:44:47 +0000
committerShaun Amott <shaun@FreeBSD.org>2006-08-25 01:44:47 +0000
commit3b29421508125df3e861033cbd2bd3263c5f51a8 (patch)
tree31fc69f9cd56379697e9e7d14d1d07c91fc4b4a9 /net/generic-nqs
parentdcf3a26dfffb1877b6bdca0779c973e5a151c938 (diff)
downloadports-3b29421508125df3e861033cbd2bd3263c5f51a8.tar.gz
ports-3b29421508125df3e861033cbd2bd3263c5f51a8.zip
Notes
Diffstat (limited to 'net/generic-nqs')
-rw-r--r--net/generic-nqs/Makefile3
-rw-r--r--net/generic-nqs/files/nqs.sh50
-rw-r--r--net/generic-nqs/pkg-plist4
3 files changed, 36 insertions, 21 deletions
diff --git a/net/generic-nqs/Makefile b/net/generic-nqs/Makefile
index dcf43de672b7..5897f491bf5b 100644
--- a/net/generic-nqs/Makefile
+++ b/net/generic-nqs/Makefile
@@ -17,8 +17,6 @@ MASTER_SITE_SUBDIR= fenner
MAINTAINER= tonymaher@optusnet.com.au
COMMENT= Generic Network Queuing System
-BROKEN= Does not compile
-
USE_BZIP2= yes
IS_INTERACTIVE= yes
NO_PACKAGE= have to build on site due to the descriptors created in\
@@ -104,6 +102,7 @@ post-patch:
${SED} -e 's|-O6 -fno-strength-reduce|${CFLAGS}|' \
${WRKSRC}/SETUPDir/GSetup-Scripts/GPort-Scripts/1020-Is-gcc.sh.orig \
> ${WRKSRC}/SETUPDir/GSetup-Scripts/GPort-Scripts/1020-Is-gcc.sh
+ @${REINPLACE_CMD} -e 's#<malloc.h>#<stdlib.h>#;' `${FIND} ${WRKSRC} -type f`
pre-configure:
@ ${SED} -e 's|XX_CFLAGS_XX|${CFLAGS}|' ${FILESDIR}/${TEMPLATE} > ${PLATFORMDIR}/${PLATFORM}; \
diff --git a/net/generic-nqs/files/nqs.sh b/net/generic-nqs/files/nqs.sh
index eefff9f50f74..e5056ad046c5 100644
--- a/net/generic-nqs/files/nqs.sh
+++ b/net/generic-nqs/files/nqs.sh
@@ -1,19 +1,35 @@
#!/bin/sh
+#
-case $1 in
-start)
- if [ -x XXXX/sbin/nqsdaemon ] ; then
- XXXX/sbin/nqsdaemon > /var/log/nqs.log
- echo -n ' nqs'
- fi
- ;;
-stop)
- killall -KILL nqsdaemon netdaemon loaddaemon && echo -n ' nqs'
- ;;
-*)
- echo "Usage: `basename $0` {start|stop}" >&2
- exit 64
- ;;
-esac
-
-exit 0
+# PROVIDE: nqs
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable NQS:
+# nqs_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable NQS
+
+. %%RC_SUBR%%
+
+name="nqs"
+rcvar=`set_rcvar`
+
+prefix="XXXX"
+logfile="/var/log/nqs.log"
+start_cmd="nqs_start"
+stop_cmd="nqs_stop"
+load_rc_config $name
+
+nqs_start()
+{
+ ${prefix}/sbin/nqsdaemon >> ${logfile} 2>&1 && echo 'Starting nqs.'
+}
+
+nqs_stop()
+{
+ /usr/bin/killall -KILL nqsdaemon netdaemon loaddaemon && echo 'Stopping nqs.'
+}
+
+run_rc_command "$1"
diff --git a/net/generic-nqs/pkg-plist b/net/generic-nqs/pkg-plist
index 721ca40d0d40..1229dc6f8b52 100644
--- a/net/generic-nqs/pkg-plist
+++ b/net/generic-nqs/pkg-plist
@@ -36,5 +36,5 @@ lib/nqs/GNQS.VERSION
lib/nqs/General.conf.def
lib/nqs/qmgr.hlp
lib/nqs/nmap/machines
-@unexec rm -rf %D/lib/nqs
-@unexec rm -rf XXXX
+@unexec rm -rf %D/lib/nqs 2>&1 >/dev/null || true
+@unexec rm -rf XXXX 2>&1 >/dev/null || true