aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2003-10-08 10:57:42 +0800
committermarcus <marcus@FreeBSD.org>2003-10-08 10:57:42 +0800
commita2e63a1b65529e57bb404ee77188d1887c0b1b55 (patch)
tree255a2ab6c61ca6b5995603b5a45e11943c06d94a /net-mgmt
parentd993bcd97f235e6c5f24253c7f5b71f603a70bda (diff)
downloadfreebsd-ports-gnome-a2e63a1b65529e57bb404ee77188d1887c0b1b55.tar.gz
freebsd-ports-gnome-a2e63a1b65529e57bb404ee77188d1887c0b1b55.tar.zst
freebsd-ports-gnome-a2e63a1b65529e57bb404ee77188d1887c0b1b55.zip
Add OpenVMPS, a GPL implementation of a VLAN Management Policy Server. VMPS
allows for dynamic VLAN membership on Cisco switches. PR: 57723 Submitted by: Craig Boston <craig@yekse.gank.org>
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/openvmps/Makefile38
-rw-r--r--net-mgmt/openvmps/distinfo1
-rw-r--r--net-mgmt/openvmps/files/patch-aa31
-rw-r--r--net-mgmt/openvmps/files/patch-ab10
-rw-r--r--net-mgmt/openvmps/files/vmps.db49
-rw-r--r--net-mgmt/openvmps/files/vmpsd.sh34
-rw-r--r--net-mgmt/openvmps/pkg-descr5
-rw-r--r--net-mgmt/openvmps/pkg-plist4
8 files changed, 172 insertions, 0 deletions
diff --git a/net-mgmt/openvmps/Makefile b/net-mgmt/openvmps/Makefile
new file mode 100644
index 000000000000..aa1d1763bf09
--- /dev/null
+++ b/net-mgmt/openvmps/Makefile
@@ -0,0 +1,38 @@
+# New ports collection makefile for: openvmps
+# Date created: 6 October 2003
+# Whom: Craig Boston <craig@yekse.gank.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= openvmps
+PORTVERSION= 1.0
+CATEGORIES= net
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= vmps
+DISTNAME= vmpsd-${PORTVERSION}
+
+MAINTAINER= craig@yekse.gank.org
+COMMENT= A GPL implementation of the VMPS protocol
+
+USE_RC_SUBR= yes
+
+GNU_CONFIGURE= yes
+USE_GMAKE= yes
+
+CONFIGURE_ARGS=--bindir=${PREFIX}/sbin
+
+RC_SCRIPTS_SUB= PREFIX=${PREFIX} \
+ RC_SUBR=${RC_SUBR}
+
+post-install:
+ @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${FILESDIR}/vmpsd.sh > ${PREFIX}/etc/rc.d/vmpsd.sh
+ @${CHMOD} 755 ${PREFIX}/etc/rc.d/vmpsd.sh
+ ${INSTALL_DATA} -m 644 ${FILESDIR}/vmps.db \
+ ${PREFIX}/etc/vmps.db.sample
+ @if [ ! -f ${PREFIX}/etc/vmps.db ]; then \
+ ${CP} -p ${PREFIX}/etc/vmps.db.sample ${PREFIX}/etc/vmps.db ; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/openvmps/distinfo b/net-mgmt/openvmps/distinfo
new file mode 100644
index 000000000000..75c04805c5ed
--- /dev/null
+++ b/net-mgmt/openvmps/distinfo
@@ -0,0 +1 @@
+MD5 (vmpsd-1.0.tar.gz) = 801cef57df8be2db6536fd60e73a2a89
diff --git a/net-mgmt/openvmps/files/patch-aa b/net-mgmt/openvmps/files/patch-aa
new file mode 100644
index 000000000000..92e2162ab493
--- /dev/null
+++ b/net-mgmt/openvmps/files/patch-aa
@@ -0,0 +1,31 @@
+--- daemon.c.orig Mon Oct 6 16:32:28 2003
++++ daemon.c Mon Oct 6 16:37:02 2003
+@@ -10,8 +10,10 @@
+ #ifdef SETPGRP_VOID
+ #define SYSV
+ #else
++#ifndef BSD
+ #define BSD
+ #endif
++#endif
+
+ extern int errno;
+
+@@ -30,7 +32,7 @@
+ #ifdef BSD
+
+ int pid;
+- union wait status;
++ int status;
+ while ( (pid = wait3(&status, WNOHANG, (struct rusage *) 0)) > 0 ) ;
+
+ #endif
+@@ -105,7 +107,7 @@
+ #ifdef BSD
+ RETSIGTYPE sig_child();
+
+- signal(SIGCLD, sig_child);
++ signal(SIGCHLD, sig_child);
+ #else
+ signal(SIGCLD,SIG_IGN);
+ #endif
diff --git a/net-mgmt/openvmps/files/patch-ab b/net-mgmt/openvmps/files/patch-ab
new file mode 100644
index 000000000000..1de755cf0b03
--- /dev/null
+++ b/net-mgmt/openvmps/files/patch-ab
@@ -0,0 +1,10 @@
+--- data.h.orig Mon Oct 6 16:38:37 2003
++++ data.h Mon Oct 6 16:38:49 2003
+@@ -3,6 +3,7 @@
+ #define __DATA__
+
+ #include <search.h>
++#include <unistd.h>
+
+ #include <sys/socket.h>
+ #include <netinet/in.h>
diff --git a/net-mgmt/openvmps/files/vmps.db b/net-mgmt/openvmps/files/vmps.db
new file mode 100644
index 000000000000..26f9261e4762
--- /dev/null
+++ b/net-mgmt/openvmps/files/vmps.db
@@ -0,0 +1,49 @@
+! $FreeBSD$
+!
+! Sample VLAN database file for OpenVMPS server
+!
+!vmps domain <domain-name>
+! The VMPS domain must be defined.
+!vmps mode { open | secure }
+! The default mode is open.
+!vmps fallback <vlan-name>
+!vmps no-domain-req { allow | deny }
+!
+! The default value is allow.
+vmps domain CHANGE_THIS
+vmps mode open
+vmps fallback --NONE--
+vmps no-domain-req deny
+!
+!
+!MAC Addresses
+!
+!vmps-mac-addrs
+!
+! address <addr> vlan-name <vlan_name>
+!
+! address 00a0.2460.c452 vlan-name ST
+! address 10a0.2460.c452 vlan-name ST
+! address 20a0.2460.c452 vlan-name ST
+! address 30a0.2460.c452 vlan-name ST
+! address 40a0.2460.c452 vlan-name ST
+! address 0090.278c.59d5 vlan-name ST
+!
+!Port Groups
+!
+!vmps-port-group <group-name>
+! device <device-id> { port <port-name> | all-ports }
+!
+!
+!
+!VLAN groups
+!
+!vmps-vlan-group <group-name>
+! vlan-name <vlan-name>
+!
+!
+!VLAN port Policies
+!
+!vmps-port-policies {vlan-name <vlan_name> | vlan-group <group-name> }
+! { port-group <group-name> | device <device-id> port <port-name> }
+!
diff --git a/net-mgmt/openvmps/files/vmpsd.sh b/net-mgmt/openvmps/files/vmpsd.sh
new file mode 100644
index 000000000000..58fd33e646fe
--- /dev/null
+++ b/net-mgmt/openvmps/files/vmpsd.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# Start or stop vmpsd
+# $FreeBSD$
+
+# PROVIDE: vmpsd
+# REQUIRE: DAEMON
+# KEYWORD: FreeBSD shutdown
+#
+# NOTE for FreeBSD 5.0+:
+# If you want this script to start with the base rc scripts
+# move imapd.sh to /etc/rc.d/vmpsd
+
+prefix=%%PREFIX%%
+
+# Define these vmpsd_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/vmpsd
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+[ -z "$vmpsd_enable" ] && vmpsd_enable="NO" # Enable vmpsd
+#vmpsd_program="${prefix}/sbin/vmpsd" # Location of vmpsd
+[ -z "$vmpsd_flags" ] && vmpsd_flags="-f /usr/local/etc/vmps.db" # Flags to vmpsd program
+
+. %%RC_SUBR%%
+
+name="vmpsd"
+rcvar=`set_rcvar`
+command="${prefix}/sbin/${name}"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/net-mgmt/openvmps/pkg-descr b/net-mgmt/openvmps/pkg-descr
new file mode 100644
index 000000000000..f4b21bb58169
--- /dev/null
+++ b/net-mgmt/openvmps/pkg-descr
@@ -0,0 +1,5 @@
+VMPS (VLAN Management Policy Server) is a way of assigning switch ports to
+specific VLANs based on the MAC address of connecting device. OpenVMPS is a
+GPL implementation of VMPS.
+
+WWW: http://vmps.sourceforge.net/
diff --git a/net-mgmt/openvmps/pkg-plist b/net-mgmt/openvmps/pkg-plist
new file mode 100644
index 000000000000..340d2c50b317
--- /dev/null
+++ b/net-mgmt/openvmps/pkg-plist
@@ -0,0 +1,4 @@
+etc/rc.d/vmpsd.sh
+@unexec if cmp -s %D/etc/vmps.db %D/etc/vmps.db.sample; then rm -f %D/etc/vmps.db; fi
+etc/vmps.db.sample
+sbin/vmpsd