summaryrefslogtreecommitdiff
path: root/net/lmd
diff options
context:
space:
mode:
authorNorikatsu Shigemura <nork@FreeBSD.org>2002-05-16 10:26:39 +0000
committerNorikatsu Shigemura <nork@FreeBSD.org>2002-05-16 10:26:39 +0000
commit833c9d2bebd8cee334b9665349418d96db166a40 (patch)
treeaa871d2eec897b27ca026ec8d05d403aacd8139e /net/lmd
parentAdd new ports. (diff)
Add new ports.
PR: ports/37661 Submitted by: Alex Dupre <sysadmin@alexdupre.com> Approved by: knu (mentor)
Notes
Notes: svn path=/head/; revision=59250
Diffstat (limited to 'net/lmd')
-rw-r--r--net/lmd/distinfo1
-rw-r--r--net/lmd/files/lmd.sh35
-rw-r--r--net/lmd/files/patch-Makefile29
-rw-r--r--net/lmd/files/patch-main.c11
-rw-r--r--net/lmd/files/patch-modules_check::Makefile22
-rw-r--r--net/lmd/pkg-comment1
-rw-r--r--net/lmd/pkg-descr12
-rw-r--r--net/lmd/pkg-message.in8
-rw-r--r--net/lmd/pkg-plist7
9 files changed, 126 insertions, 0 deletions
diff --git a/net/lmd/distinfo b/net/lmd/distinfo
new file mode 100644
index 000000000000..dd6dd16a668f
--- /dev/null
+++ b/net/lmd/distinfo
@@ -0,0 +1 @@
+MD5 (lmd-0.8.tar.gz) = 909e335b4a406d2b14c0db21e4840ab6
diff --git a/net/lmd/files/lmd.sh b/net/lmd/files/lmd.sh
new file mode 100644
index 000000000000..e9d93c2833e7
--- /dev/null
+++ b/net/lmd/files/lmd.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${0##*/}\$"); then
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 64
+fi
+
+if [ -r /etc/defaults/rc.conf ]; then
+ . /etc/defaults/rc.conf
+ source_rc_confs
+elif [ -r /etc/rc.conf ]; then
+ . /etc/rc.conf
+fi
+
+case "$1" in
+start)
+ case ${lmd_enable:-NO} in
+ [Yy][Ee][Ss])
+ [ -f ${PREFIX}/etc/lmd.conf ] && ${lmd_program:-${PREFIX}/sbin/lmd} ${lmd_flags} && echo -n ' lmd'
+ ;;
+ esac
+ ;;
+stop)
+ case ${lmd_enable:-NO} in
+ [Yy][Ee][Ss])
+ [ -f ${PREFIX}/etc/lmd.conf ] && /usr/bin/killall lmd && echo -n ' lmd'
+ ;;
+ esac
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ ;;
+esac
+
+exit 0
diff --git a/net/lmd/files/patch-Makefile b/net/lmd/files/patch-Makefile
new file mode 100644
index 000000000000..211e76b7a333
--- /dev/null
+++ b/net/lmd/files/patch-Makefile
@@ -0,0 +1,29 @@
+--- Makefile.orig Mon Nov 26 07:30:14 2001
++++ Makefile Tue May 14 14:18:21 2002
+@@ -1,18 +1,21 @@
+ SRCS=main.c socket.c chkmodules.c conf.c
+ OBJS=${SRCS:.c=.o}
+ DYNLIB=modules_check/ldd_http_module.so
+-OPTS=-O3 -fomit-frame-pointer -pipe -Wall -ansi
++OPTS=${CFLAGS} ${CPPFLAGS} -Wall -ansi
+ #DEBUG=-DDEBUG -g
+-LIBS=-L/usr/local/lib -lm
++LIBS=-L${PREFIX}/lib -lm
++CC?=cc
++
++all: lmd modules_check/ldd_http_module.so
+
+ lmd: ${OBJS} ${DYNLIB}
+- gcc ${DEBUG} ${OPTS} ${OBJS} -o lmd ${LIBS}
++ ${CC} ${DEBUG} ${OPTS} ${OBJS} -o lmd ${LIBS}
+
+ .c.o: ${SRCS}
+- gcc ${DEBUG} ${OPTS} -c $<
++ ${CC} ${DEBUG} ${OPTS} -c $<
+
+ modules_check/ldd_http_module.so:
+- cd ./modules_check && make && cd ..
++ cd ./modules_check && make 'CC=${CC}' 'CFLAGS=${CFLAGS}' 'CPPFLAGS=${CPPFLAGS}' && cd ..
+
+ clean:
+ rm -rf ${OBJS} lmd *.core *~ modules_check/*.so
diff --git a/net/lmd/files/patch-main.c b/net/lmd/files/patch-main.c
new file mode 100644
index 000000000000..6da527ce86b4
--- /dev/null
+++ b/net/lmd/files/patch-main.c
@@ -0,0 +1,11 @@
+--- main.c.orig Mon Nov 26 06:45:34 2001
++++ main.c Tue May 14 14:09:46 2002
+@@ -1,7 +1,7 @@
+ #include "main.h"
+ #include <math.h>
+ #define TIMETOSLEEP 60
+-#define CONFIGFILE "/usr/local/etc/lmd.conf"
++#define CONFIGFILE PREFIX "/etc/lmd.conf"
+
+ char bufferout[2][1024];
+ char **loaddservers;
diff --git a/net/lmd/files/patch-modules_check::Makefile b/net/lmd/files/patch-modules_check::Makefile
new file mode 100644
index 000000000000..7ef750a84888
--- /dev/null
+++ b/net/lmd/files/patch-modules_check::Makefile
@@ -0,0 +1,22 @@
+--- modules_check/Makefile.orig Mon Nov 26 07:31:09 2001
++++ modules_check/Makefile Tue May 14 14:16:16 2002
+@@ -1,14 +1,15 @@
+ # If you want to debug lmd comment out this line and recompile it
+ # Launch lmd with -v option to see debug messages
+ #DEBUG=-DDEBUG
+-OPTS=-Wall -fomit-frame-pointer -O2 -pipe -ansi
++OPTS=${CFLAGS} ${CPPFLAGS} -ansi
++CC?=cc
+
+ all: socket.o
+- gcc ${DEBUG} ${OPTS} -c ldd_http_module.c
+- gcc ${DEBUG} -shared ldd_http_module.o socket.o -o ldd_http_module.so
++ ${CC} ${DEBUG} ${OPTS} -c ldd_http_module.c
++ ${CC} ${DEBUG} -shared ldd_http_module.o socket.o -o ldd_http_module.so
+
+ socket.o:
+- gcc -c ../socket.c -o socket.o
++ ${CC} -c ../socket.c -o socket.o
+
+ clean:
+ rm *.so *.o
diff --git a/net/lmd/pkg-comment b/net/lmd/pkg-comment
new file mode 100644
index 000000000000..f56cca92ac18
--- /dev/null
+++ b/net/lmd/pkg-comment
@@ -0,0 +1 @@
+A Load Monitor Daemon
diff --git a/net/lmd/pkg-descr b/net/lmd/pkg-descr
new file mode 100644
index 000000000000..cae9eef79721
--- /dev/null
+++ b/net/lmd/pkg-descr
@@ -0,0 +1,12 @@
+lmd is a daemon that monitors the server load and communicates
+with loadd for Intellingence Load Sharing (Balancing with
+realtime load).
+
+Supported modules:
+
+* http
+
+WWW: http://www.bsdshell.net/hut_loadd.html
+
+- Alex Dupre
+sysadmin@alexdupre.com
diff --git a/net/lmd/pkg-message.in b/net/lmd/pkg-message.in
new file mode 100644
index 000000000000..5a1875a0a1fb
--- /dev/null
+++ b/net/lmd/pkg-message.in
@@ -0,0 +1,8 @@
+##################################################
+ !! IMPORTANT !! CONFIGURE YOUR LMD CLIENT WITH
+ THE %PREFIX%/etc/lmd.conf CONFIGURATION FILE
+ Just set loaddservers to the IP of your loadd
+ server. You can specify multiple loadd servers
+ with the ',' separator
+ Example: loaddservers = 63.2.1.3, 62.3.5.6
+##################################################
diff --git a/net/lmd/pkg-plist b/net/lmd/pkg-plist
new file mode 100644
index 000000000000..82458824c348
--- /dev/null
+++ b/net/lmd/pkg-plist
@@ -0,0 +1,7 @@
+sbin/lmd
+etc/lmd.conf.sample
+lib/ldd_http_module.so
+%%PORTDOCS%%share/doc/lmd/README
+%%PORTDOCS%%share/doc/lmd/INSTALL
+%%PORTDOCS%%share/doc/lmd/LICENSE
+%%PORTDOCS%%@dirrm share/doc/lmd