summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Kriegner <dominik.kriegner@gmail.com>2019-01-06 10:54:19 +0100
committerDominik Kriegner <dominik.kriegner@gmail.com>2019-01-06 10:54:19 +0100
commit8bc8982671389f92df589c89f9a6d4e420630844 (patch)
tree88bd1eb4ba38dfce3676f10582ec4d335418b0da
parentnet-misc/netvirt: update dependencies (diff)
downloadanaximander-8bc8982671389f92df589c89f9a6d4e420630844.tar.gz
anaximander-8bc8982671389f92df589c89f9a6d4e420630844.tar.bz2
anaximander-8bc8982671389f92df589c89f9a6d4e420630844.zip
net-misc/netvirt: update init scripts; add config
Signed-off-by: Dominik Kriegner <dominik.kriegner@gmail.com> Package-Manager: Portage-2.3.54, Repoman-2.3.12 Manifest-Sign-Key: 0x6D0F122FFA4B630F
-rw-r--r--net-misc/netvirt/Manifest7
-rw-r--r--net-misc/netvirt/files/netvirt-agent.conf10
-rw-r--r--net-misc/netvirt/files/netvirt-agent.rc2
-rw-r--r--net-misc/netvirt/files/netvirt-agent.service3
-rw-r--r--net-misc/netvirt/netvirt-9999.ebuild3
5 files changed, 19 insertions, 6 deletions
diff --git a/net-misc/netvirt/Manifest b/net-misc/netvirt/Manifest
index 47170ec..06905b3 100644
--- a/net-misc/netvirt/Manifest
+++ b/net-misc/netvirt/Manifest
@@ -1,4 +1,5 @@
-AUX netvirt-agent.rc 316 BLAKE2B 2332e5ed86dbbbb2ab5643a605785922f9a463f6e01d85fb5c035b79bd74b0d533b3ba3f72ef18b85a67cc10471507ae6ee8dee6716d93c19d92bfe36c1e5172 SHA512 18c229fa3b334a14d14570c7aab7e8459bfed870e9ecfeeb009904196b19fa580e81afbd6db612dc5e0e017d9e915ebe5facfb59c52bad6e847f2a18c93cdecc
-AUX netvirt-agent.service 244 BLAKE2B b53c4e2374998ace75aac36aeaebbe8e4693cdf09ee1561ab3ceb7734f2c3dc59255d2f7ddcfa930a73b7152294758dc1ad1e8653bef37240320e2e1817912c6 SHA512 61e1c26e2428b92a7751bd257491507bc29df68a51cd409c17ee30a0c53a286f156215cdc96330feb78369d59320c405dcd99c1c0b4a1f935c589f4dc3fb239d
-EBUILD netvirt-9999.ebuild 1258 BLAKE2B f63bd84fb70b6ff2ca8be537095d89e1ccaaacb1c4b1980b0521565f600a8592754daa864088aadab13febf7f37ab2f3b244db32d78d881e744d5e017466951d SHA512 895618ea4a413e000063d194182efdcea111d32f124dd3ae6c14ec139423210770231ccc40acb93e442209f7c09f85e855a86f762577a370b02932d10cc5f280
+AUX netvirt-agent.conf 348 BLAKE2B 03e31ec6b07e36689aeaa66f50d7a9df389cadcb5ee2680a5de16671caf83ca4ba99b91a5cfd91f35fe3b8377e94ef9e61bfacffe96a7ad4b0d0a008301faf5d SHA512 e2d998b32832f45b5a598a0f551aba95f3a31008904c910fdf65f4e921bd9319869094a60499fd67eb9e9e83d5bfe38a4d7df46053001dd64ab15e66a3eefa54
+AUX netvirt-agent.rc 328 BLAKE2B 417e4358ebfe311cc515a27d8d0899427f60901898d346c457b1b90ebf9c695954ca646ca20473f2d41c97748e39ea9cebd9e46d962ea46cd3b30b0701e3fffb SHA512 68704725841528503eaa9bb060cb9c7f72766139168d5094076ff075be4eea1b7fef020c0abb3af7302b733d86af549cb87a0b04bb26f7f0a6ee2bc296ffe9b9
+AUX netvirt-agent.service 299 BLAKE2B c72a1d52506c7b4ad8a5ee3fa5dc93e35ab5cc27ca7067dbd60993fbf2c61331bbaf93d90744f8cefbd1d1448e2d7ff022222d7259a867353ed1cc59b34128f2 SHA512 de7c2a85261585b6880b493fd167670226cea3aafc9f686ee7733831cc195b91507ab0a9e51d3ffe1367e3b7e4d2b5ec2c1a087035a38809bd152426152532ea
+EBUILD netvirt-9999.ebuild 1310 BLAKE2B fbd05d1dc723eeae7f24accea22a6838d69634f5ba9c7498058c2d8594a50793e9af1556900963d7e0368c16db0e44386a7941ab643b7682e0020d1c7d9e52b1 SHA512 99301e2bf3297a03a7757d234c6fa4ff6c4842c5872bbe918b29c4b0dee0f5c18b40b1736aa3fb7f89be70c0725c88a14518ed29e0cbffe1f389ac10e3f774fe
MISC metadata.xml 602 BLAKE2B 573998e1a077bbc6111964fa5d47c912ed2a5e18c0e2c4aa625f7eff30d8c4468bd5a55ee10b327df199e1e6831c056c604a5e398bc4b69e06728f34daf6ffdb SHA512 89c067677fd4ecfba9ac524cf58737f306898171f6a33f4416bfd807f32a30539298b42fcd75e7f24304fa7088b1c966e98a6495229ada3958589c060c93c179
diff --git a/net-misc/netvirt/files/netvirt-agent.conf b/net-misc/netvirt/files/netvirt-agent.conf
new file mode 100644
index 0000000..ed09a59
--- /dev/null
+++ b/net-misc/netvirt/files/netvirt-agent.conf
@@ -0,0 +1,10 @@
+# Config file for /etc/init.d/netvirt-agent and systemd unit
+
+# PLEASE READ THIS IF YOU ARE USING SYSTEMD
+# Please note that systemd does not expand shell variables
+# thus, something like FOO="${FOO} bar" won't work.
+
+# Specify the netvirt network name you want to connect to.
+# **NOTE** For a list see: netvirt-agent2 -l
+#
+NETVIRT_NETWORK_NAME=""
diff --git a/net-misc/netvirt/files/netvirt-agent.rc b/net-misc/netvirt/files/netvirt-agent.rc
index 0561934..09703ae 100644
--- a/net-misc/netvirt/files/netvirt-agent.rc
+++ b/net-misc/netvirt/files/netvirt-agent.rc
@@ -5,7 +5,7 @@
description="start a daemon to maintain a DynVPN connection"
-command="netvirt-agent2 -c NETWORKNAME"
+command="netvirt-agent2 -c ${NETVIRT_NETWORK_NAME}"
command_background="true"
pidfile="/var/run/${SVCNAME}.pid"
diff --git a/net-misc/netvirt/files/netvirt-agent.service b/net-misc/netvirt/files/netvirt-agent.service
index 0125c49..fcec932 100644
--- a/net-misc/netvirt/files/netvirt-agent.service
+++ b/net-misc/netvirt/files/netvirt-agent.service
@@ -4,7 +4,8 @@ After=network.target
[Service]
Environment="HOME=/root"
-ExecStart=/usr/bin/netvirt-agent2 -c NETWORKNAME
+EnvironmentFile=-/etc/conf.d/netvirt-agent
+ExecStart=/usr/bin/netvirt-agent2 -c ${NETVIRT_NETWORK_NAME}
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=always
diff --git a/net-misc/netvirt/netvirt-9999.ebuild b/net-misc/netvirt/netvirt-9999.ebuild
index 97fb741..be337fb 100644
--- a/net-misc/netvirt/netvirt-9999.ebuild
+++ b/net-misc/netvirt/netvirt-9999.ebuild
@@ -46,10 +46,11 @@ src_install() {
cmake-utils_src_install
systemd_newunit "${FILESDIR}"/netvirt-agent.service netvirt-agent.service
newinitd "${FILESDIR}"/netvirt-agent.rc netvirt-agent
+ newconfd "${FILESDIR}"/netvirt-agent.conf netvirt-agent
}
pkg_postinst() {
elog "Carefully read https://doc.dynvpn.com to get started. In particular"
elog "you will have to provision a network using netvirt-agent2 -k ... and"
- elog "edit the init scripts to connect to the right network."
+ elog "edit the config file in /etc/conf.d/netvirt-agent"
}