aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorleeym <leeym@FreeBSD.org>2005-05-28 02:21:51 +0800
committerleeym <leeym@FreeBSD.org>2005-05-28 02:21:51 +0800
commit63ea67421fb1d1028b8e6bd811b097d8c87a1f62 (patch)
tree5f686ff91df8a2cf10793fbf6f0eba36db6043aa /security
parentc57f7c17d08c6b6a5f6b56171f23f355c5870d64 (diff)
downloadfreebsd-ports-gnome-63ea67421fb1d1028b8e6bd811b097d8c87a1f62.tar.gz
freebsd-ports-gnome-63ea67421fb1d1028b8e6bd811b097d8c87a1f62.tar.zst
freebsd-ports-gnome-63ea67421fb1d1028b8e6bd811b097d8c87a1f62.zip
- fix connect script
- remove obsolete fulltunnel script - add disconnect script PR: 81550 Submitted by: Christian Lackas <delta@lackas.net>
Diffstat (limited to 'security')
-rw-r--r--security/vpnc/Makefile10
-rw-r--r--security/vpnc/files/patch-config.c13
-rw-r--r--security/vpnc/files/patch-vpnc-disconnect10
-rw-r--r--security/vpnc/files/patch-vpnc-script54
-rw-r--r--security/vpnc/pkg-plist2
5 files changed, 80 insertions, 9 deletions
diff --git a/security/vpnc/Makefile b/security/vpnc/Makefile
index 43306be6883a..2d881a45e8c0 100644
--- a/security/vpnc/Makefile
+++ b/security/vpnc/Makefile
@@ -7,10 +7,10 @@
PORTNAME= vpnc
PORTVERSION= 0.3.3
+PORTREVISION= 1
CATEGORIES= security
-MASTER_SITES= http://www.unix-ag.uni-kl.de/~massar/vpnc/:source \
- http://dragon.roe.ch/mirrors/distfiles/vpnc/:script
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:source ${STARTSCRIPT}:script
+MASTER_SITES= http://www.unix-ag.uni-kl.de/~massar/vpnc/
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= delta@lackas.net
@@ -37,12 +37,10 @@ post-patch:
do-install:
@${INSTALL_PROGRAM} -m 751 ${WRKSRC}/vpnc ${PREFIX}/sbin/vpnc
@${INSTALL_SCRIPT} -m 751 ${WRKSRC}/vpnc-script ${PREFIX}/sbin/vpnc-script
- @${INSTALL_SCRIPT} ${DISTDIR}/${STARTSCRIPT} ${WRKDIR}/vpnc.sh-fulltunnel
- @${REINPLACE_CMD} -e 's|PREFIX=/usr/local|PREFIX=${PREFIX}|' ${WRKDIR}/vpnc.sh-fulltunnel
+ @${INSTALL_SCRIPT} -m 751 ${WRKSRC}/vpnc-disconnect ${PREFIX}/sbin/vpnc-disconnect
@${INSTALL_SCRIPT} ${FILESDIR}/vpnc.sh ${WRKDIR}
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKDIR}/vpnc.sh
@${INSTALL_SCRIPT} -m 755 ${WRKDIR}/vpnc.sh ${PREFIX}/etc/rc.d/vpnc.sh.sample
- @${INSTALL_SCRIPT} -m 755 ${WRKDIR}/vpnc.sh-fulltunnel ${PREFIX}/etc/rc.d/vpnc.sh.sample-fulltunnel
@${INSTALL_DATA} -m 600 ${WRKSRC}/vpnc.conf ${PREFIX}/etc/vpnc.conf.sample
.if !defined(NO_INSTALL_MANPAGES)
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/vpnc.8
diff --git a/security/vpnc/files/patch-config.c b/security/vpnc/files/patch-config.c
index 06ba2d56c0d1..da017cb6df89 100644
--- a/security/vpnc/files/patch-config.c
+++ b/security/vpnc/files/patch-config.c
@@ -1,5 +1,14 @@
---- config.c.orig Sat May 14 13:20:11 2005
-+++ config.c Sat May 14 13:20:51 2005
+--- config.c.bak Sun May 15 15:06:20 2005
++++ config.c Sun May 15 15:06:52 2005
+@@ -125,7 +125,7 @@
+
+ static const char *config_def_script(void)
+ {
+- return "/etc/vpnc/vpnc-script";
++ return "%%PREFIX%%/sbin/vpnc-script";
+ }
+
+ static const char *config_def_pid_file(void)
@@ -520,8 +520,8 @@
}
diff --git a/security/vpnc/files/patch-vpnc-disconnect b/security/vpnc/files/patch-vpnc-disconnect
new file mode 100644
index 000000000000..80c271ff31c4
--- /dev/null
+++ b/security/vpnc/files/patch-vpnc-disconnect
@@ -0,0 +1,10 @@
+--- vpnc-disconnect.orig Fri May 27 12:27:48 2005
++++ vpnc-disconnect Fri May 27 12:28:02 2005
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+
+-pid=/var/run/vpnc/pid
++pid=/var/run/vpnc.pid
+
+ if [ $# -ne 0 ]; then
+ echo "Usage: $0" 1>&2
diff --git a/security/vpnc/files/patch-vpnc-script b/security/vpnc/files/patch-vpnc-script
new file mode 100644
index 000000000000..414cbdde1e07
--- /dev/null
+++ b/security/vpnc/files/patch-vpnc-script
@@ -0,0 +1,54 @@
+--- vpnc-script.orig Thu May 5 19:05:18 2005
++++ vpnc-script Fri May 27 12:21:50 2005
+@@ -19,8 +19,8 @@
+ #set -x
+
+ OS="`uname -s`"
+-DEFAULT_ROUTE_FILE=/var/run/vpnc/defaultroute
+-RESOLV_CONF_BACKUP=/var/run/vpnc/resolv.conf-backup
++DEFAULT_ROUTE_FILE=/var/run/vpnc.defaultroute
++RESOLV_CONF_BACKUP=/var/run/vpnc.resolv.conf-backup
+
+ IPROUTE="`which ip 2> /dev/null`"
+
+@@ -117,7 +117,7 @@
+ }
+ else
+ get_default_gw() {
+- netstat -r -n | grep '^0.0.0.0' | awk '{print $2}'
++ netstat -r -n | grep '^default' | awk '{print $2}'
+ }
+
+ set_vpngateway_route() {
+@@ -219,11 +219,14 @@
+ do_ifconfig
+ set_vpngateway_route
+ if [ -n "$CISCO_SPLIT_INC" ]; then
+- for ((i = 0 ; i < CISCO_SPLIT_INC ; i++ )) ; do
++ # for ((i = 0 ; i < CISCO_SPLIT_INC ; i++ )) ; do
++ i=0
++ while [ $i -lt ${CISCO_SPLIT_INC} ]; do
+ eval NETWORK="\${CISCO_SPLIT_INC_${i}_ADDR}"
+ eval NETMASK="\${CISCO_SPLIT_INC_${i}_MASK}"
+ eval NETMASKLEN="\${CISCO_SPLIT_INC_${i}_MASKLEN}"
+ set_network_route "$NETWORK" "$NETMASK" "$NETMASKLEN"
++ i=`expr $i + 1`
+ done
+ for i in $INTERNAL_IP4_DNS ; do
+ set_network_route "$i" "255.255.255.255" "32"
+@@ -239,11 +242,14 @@
+
+ do_disconnect() {
+ if [ -n "$CISCO_SPLIT_INC" ]; then
+- for ((i = 0 ; i < CISCO_SPLIT_INC ; i++ )) ; do
++ # for ((i = 0 ; i < CISCO_SPLIT_INC ; i++ )) ; do
++ i=0
++ while [ $i -lt ${CISCO_SPLIT_INC} ]; do
+ eval NETWORK="\${CISCO_SPLIT_INC_${i}_ADDR}"
+ eval NETMASK="\${CISCO_SPLIT_INC_${i}_MASK}"
+ eval NETMASKLEN="\${CISCO_SPLIT_INC_${i}_MASKLEN}"
+ del_network_route "$NETWORK" "$NETMASK" "$NETMASKLEN"
++ i=`expr $i + 1`
+ done
+ for i in $INTERNAL_IP4_DNS ; do
+ del_network_route "$i" "255.255.255.255" "32"
diff --git a/security/vpnc/pkg-plist b/security/vpnc/pkg-plist
index 3bded1bccdd8..db37548aa25c 100644
--- a/security/vpnc/pkg-plist
+++ b/security/vpnc/pkg-plist
@@ -1,8 +1,8 @@
sbin/vpnc
sbin/vpnc-script
+sbin/vpnc-disconnect
etc/vpnc.conf.sample
etc/rc.d/vpnc.sh.sample
-etc/rc.d/vpnc.sh.sample-fulltunnel
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
%%PORTDOCS%%%%DOCSDIR%%/TODO