commit: 536078a113e2ac969d5300bf80913bceea82f20a
Author: Jan-Espen Oversand <sigsegv <AT> radiotube <DOT> org>
AuthorDate: Wed Oct 29 06:13:55 2025 +0000
Commit: David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Wed Oct 29 06:13:55 2025 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=536078a1
net-vpn/vtun-embedded: fix mistake
forgot the files dir, sorry.
Signed-off-by: Jan-Espen Oversand <sigsegv <AT> radiotube.org>
net-vpn/vtun-embedded/files/vtun-embedded.rc | 33 ++++++++++++++++++++++++++
net-vpn/vtun-embedded/files/vtunemd-start.conf | 33 ++++++++++++++++++++++++++
2 files changed, 66 insertions(+)
diff --git a/net-vpn/vtun-embedded/files/vtun-embedded.rc
b/net-vpn/vtun-embedded/files/vtun-embedded.rc
new file mode 100644
index 0000000000..b6aa17d046
--- /dev/null
+++ b/net-vpn/vtun-embedded/files/vtun-embedded.rc
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ IFS=$(printf '\n.'); # Set separator (IFS) to <newline><dot>
+ IFS=${IFS%.}; # Remove <dot> - The <dot> was because shells
remove trailing newlines with $(..)
+ for line in `grep -v '^[[:space:]]*#' /etc/vtunemd-start.conf | grep -v
'^[[:space:]]*$'`
+ do
+ echo $line |
+ (IFS=" "
+ read host server args
+ if [ "$host" = "--server--" ]; then
+ ebegin "Starting vtunemd server"
+ /usr/sbin/vtunemd -s -P $server $args
+ eend $?
+ else
+ ebegin "Starting vtund client $host to $server"
+ /usr/sbin/vtunemd $args -- $host $server
+ eend $?
+ fi)
+ done
+}
+
+stop() {
+ ebegin "Stopping all vtunemd servers and clients"
+ killall vtunemd
+ eend $?
+}
diff --git a/net-vpn/vtun-embedded/files/vtunemd-start.conf
b/net-vpn/vtun-embedded/files/vtunemd-start.conf
new file mode 100644
index 0000000000..01de38322f
--- /dev/null
+++ b/net-vpn/vtun-embedded/files/vtunemd-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