summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Nelson <jnelson@gentoo.org>2002-04-28 19:43:07 +0000
committerJon Nelson <jnelson@gentoo.org>2002-04-28 19:43:07 +0000
commit0ab664c6d9c464caced0081cc83c4f66e618d042 (patch)
tree881af12ddb27740c7d89ce2925b827c30ad9c0c1 /net-misc/vtun/files
parentCleaned up a bit more. (diff)
downloadgentoo-2-0ab664c6d9c464caced0081cc83c4f66e618d042.tar.gz
gentoo-2-0ab664c6d9c464caced0081cc83c4f66e618d042.tar.bz2
gentoo-2-0ab664c6d9c464caced0081cc83c4f66e618d042.zip
adding vtun. closes 1697
Diffstat (limited to 'net-misc/vtun/files')
-rw-r--r--net-misc/vtun/files/digest-vtun-2.51
-rw-r--r--net-misc/vtun/files/vtun-2.5-expect.patch11
-rw-r--r--net-misc/vtun/files/vtun-2.5-makefile.patch50
-rw-r--r--net-misc/vtun/files/vtun.rc32
-rw-r--r--net-misc/vtun/files/vtund-start.conf33
5 files changed, 127 insertions, 0 deletions
diff --git a/net-misc/vtun/files/digest-vtun-2.5 b/net-misc/vtun/files/digest-vtun-2.5
new file mode 100644
index 000000000000..abf8dfbce137
--- /dev/null
+++ b/net-misc/vtun/files/digest-vtun-2.5
@@ -0,0 +1 @@
+MD5 b29bffeb07e66567e247641919c45b23 vtun-2.5.tar.gz 92510
diff --git a/net-misc/vtun/files/vtun-2.5-expect.patch b/net-misc/vtun/files/vtun-2.5-expect.patch
new file mode 100644
index 000000000000..ce853c464287
--- /dev/null
+++ b/net-misc/vtun/files/vtun-2.5-expect.patch
@@ -0,0 +1,11 @@
+--- vtun-2.5/cfg_file.y Sun Feb 17 22:03:05 2002
++++ vtun-2.5-expect/cfg_file.y Sun Feb 17 22:03:17 2002
+@@ -68,7 +68,7 @@
+ int num;
+ struct { int num1; int num2; } dnum;
+ }
+-%expect 18
++%expect 20
+
+ %token K_OPTIONS K_DEFAULT K_PORT K_PERSIST K_TIMEOUT
+ %token K_PASSWD K_PROG K_PPP K_SPEED K_IFCFG K_FWALL K_ROUTE K_DEVICE
diff --git a/net-misc/vtun/files/vtun-2.5-makefile.patch b/net-misc/vtun/files/vtun-2.5-makefile.patch
new file mode 100644
index 000000000000..e37a6441acd0
--- /dev/null
+++ b/net-misc/vtun/files/vtun-2.5-makefile.patch
@@ -0,0 +1,50 @@
+diff -ruN vtun-2.3.orig/Makefile.in vtun-2.3/Makefile.in
+--- vtun-2.3.orig/Makefile.in Mon May 29 15:35:11 2000
++++ vtun-2.3/Makefile.in Sat Sep 23 14:17:28 2000
+@@ -27,8 +27,9 @@
+ LEX = @LEX@
+ LEXFLAGS = -t
+
++DESTDIR =
++
+ INSTALL = @INSTALL@
+-INSTALL_OWNER = -o root -g 0
+
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+@@ -79,24 +80,20 @@
+ rm -f `cat vtun.drivers`
+
+ install_man:
+- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(MAN_DIR)/man8
+- $(INSTALL) -m 644 $(INSTALL_OWNER) vtund.8 $(MAN_DIR)/man8
+- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(MAN_DIR)/man5
+- $(INSTALL) -m 644 $(INSTALL_OWNER) vtund.conf.5 $(MAN_DIR)/man5
+- rm -f $(MAN_DIR)/man8/vtun.8
+- ln -s vtund.8 $(MAN_DIR)/man8/vtun.8
++ $(INSTALL) -d -m 755 $(DESTDIR)$(MAN_DIR)/man8
++ $(INSTALL) -m 644 vtund.8 $(DESTDIR)$(MAN_DIR)/man8
++ $(INSTALL) -d -m 755 $(DESTDIR)$(MAN_DIR)/man5
++ $(INSTALL) -m 644 vtund.conf.5 $(DESTDIR)$(MAN_DIR)/man5
+
+ install_config:
+- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(ETC_DIR)
+- if [ ! -f $(ETC_DIR)/vtund.conf ]; then \
+- $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(ETC_DIR); \
+- fi
++ $(INSTALL) -d -m 755 $(DESTDIR)$(ETC_DIR)
++ $(INSTALL) -m 600 vtund.conf $(DESTDIR)$(ETC_DIR);
+
+ install: vtund install_config install_man
+- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(VAR_DIR)/run
+- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(STAT_DIR)
+- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(LOCK_DIR)
+- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(SBIN_DIR)
+- $(INSTALL) -m 755 $(INSTALL_OWNER) vtund $(SBIN_DIR)
++ $(INSTALL) -d -m 755 $(DESTDIR)$(VAR_DIR)/run
++ $(INSTALL) -d -m 755 $(DESTDIR)$(STAT_DIR)
++ $(INSTALL) -d -m 755 $(DESTDIR)$(LOCK_DIR)
++ $(INSTALL) -d -m 755 $(DESTDIR)$(SBIN_DIR)
++ $(INSTALL) -m 755 vtund $(DESTDIR)$(SBIN_DIR)
+
+ # DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/net-misc/vtun/files/vtun.rc b/net-misc/vtun/files/vtun.rc
new file mode 100644
index 000000000000..77ef993ddd1d
--- /dev/null
+++ b/net-misc/vtun/files/vtun.rc
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need net
+}
+
+start() {
+ IFS=""
+ for line in `grep -v '^[[:space:]]*#' /etc/vtund-start.conf | grep -v '^[[:space:]]*$'`
+ do
+ echo $line |
+ (IFS=" "
+ read host server args
+ if [ "$host" = "--server--" ]; then
+ ebegin "Starting vtund server"
+ start-stop-daemon --start --quiet --exec /usr/sbin/vtund -- $args -s -P $server
+ eend $?
+ else
+ ebegin "Starting vtund client $host to $server"
+ start-stop-daemon --start --quiet --exec /usr/sbin/vtund -- $args $host $server
+ eend $?
+ fi)
+ done
+}
+
+stop() {
+ ebegin "Stopping all vtund servers and clients"
+ killall vtund
+ eend $?
+}
diff --git a/net-misc/vtun/files/vtund-start.conf b/net-misc/vtun/files/vtund-start.conf
new file mode 100644
index 000000000000..01de38322f48
--- /dev/null
+++ b/net-misc/vtun/files/vtund-start.conf
@@ -0,0 +1,33 @@
+### this file defines whether vtund is run as a client or a server
+###
+### format is "[host] [server] <args>" or "--server-- [portnumber] <args>".
+###
+### [host] is the hostname to use as a client
+###
+### [server] is the server to connect to
+###
+### [args] is optional for both server and client and contains any additional
+### command line args for that instance of vtund. not needed by most people.
+###
+### --server-- is the literal string '--server--'. nothing more, nothing less.
+###
+### [portnumber] is the port number to run the server on.
+###
+###
+### you can have more than one client "host server" line if required,
+### and in theory, it should be possible to run as both a client and a
+### server simultaneously, but i haven't tested that.
+
+
+### examples:
+
+### to run as a client using hostname 'viper'.
+#viper vtun-server.somewhere.com.au
+
+### to run a persistent client connection using hostname 'viper'
+### connecting to a server on port 6000 and using /etc/vtun.viper.conf
+### as the config file.
+#viper vtun-server.somewhere.com.au -f /etc/vtun.viper.conf -s -P 6000
+
+### to run vtund as a server on port 5000, uncomment the following line:
+#--server-- 5000