diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/tinc/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/tinc/files')
-rw-r--r-- | net-misc/tinc/files/tinc.networks | 13 | ||||
-rw-r--r-- | net-misc/tinc/files/tincd-r1 | 79 | ||||
-rw-r--r-- | net-misc/tinc/files/tincd.conf | 20 | ||||
-rw-r--r-- | net-misc/tinc/files/tincd_at.service | 10 |
4 files changed, 122 insertions, 0 deletions
diff --git a/net-misc/tinc/files/tinc.networks b/net-misc/tinc/files/tinc.networks new file mode 100644 index 000000000000..e1844ce2ba24 --- /dev/null +++ b/net-misc/tinc/files/tinc.networks @@ -0,0 +1,13 @@ +# file: /etc/conf.d/tinc.networks for /etc/init.d/tincd + +# In this file you define the tinc networks you want to connect to + +# USAGE: +# you add a network to the init script by defining: +# NETWORK: your_network_name +# +# if you want to connect to multiple VPN's just set them behind each other. e.g. +# NETWORK: foo +# NETWORK: bar +# +# this would join the network foo and the network bar. diff --git a/net-misc/tinc/files/tincd-r1 b/net-misc/tinc/files/tincd-r1 new file mode 100644 index 000000000000..c4539a0219c5 --- /dev/null +++ b/net-misc/tinc/files/tincd-r1 @@ -0,0 +1,79 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_started_commands="reload" + +NETS="/etc/conf.d/tinc.networks" +DAEMON="/usr/sbin/tincd" + +depend() { + use logger dns + need net +} + +checkconfig() { + if [ "${RC_SVCNAME}" = "tincd" ] ; then + ALL_NETNAME="$(awk '/^ *NETWORK:/ { print $2 }' "${NETS}")" + else + ALL_NETNAME="${RC_SVCNAME#*.}" + fi + # warn this if still not found + if [ -z "${ALL_NETNAME}" ] ; then + eerror "No VPN networks configured in ${NETS}" + return 1 + fi + return 0 +} + +start() { + ebegin "Starting tinc VPN networks" + checkconfig || return 1 + for NETNAME in ${ALL_NETNAME} + do + CONFIG="/etc/tinc/${NETNAME}/tinc.conf" + PIDFILE="/var/run/tinc.${NETNAME}.pid" + if [ ! -f "${CONFIG}" ]; then + eerror "Cannot start network ${NETNAME}." + eerror "Please set up ${CONFIG} !" + else + ebegin "Starting tinc network ${NETNAME}" + if [ "${SYSLOG}" = "yes" ]; then + LOG="" + else + LOG="--logfile=/var/log/tinc.${NETNAME}.log" + fi + start-stop-daemon --start --exec "${DAEMON}" --pidfile "${PIDFILE}" -- --net="${NETNAME}" ${LOG} --pidfile "${PIDFILE}" --debug="${DEBUG_LEVEL}" ${EXTRA_OPTS} + eend $? + fi + done +} + +stop() { + ebegin "Stopping tinc VPN networks" + checkconfig || return 1 + for NETNAME in ${ALL_NETNAME} + do + PIDFILE="/var/run/tinc.${NETNAME}.pid" + if [ -f "${PIDFILE}" ]; then + ebegin "Stopping tinc network ${NETNAME}" + start-stop-daemon --stop --pidfile "${PIDFILE}" + eend $? + fi + done +} + +reload() { + ebegin "Reloading configuration for tinc VPN networks" + checkconfig || return 1 + for NETNAME in ${ALL_NETNAME} + do + PIDFILE="/var/run/tinc.${NETNAME}.pid" + if [ -f "${PIDFILE}" ]; then + ebegin "Reloading tinc network ${NETNAME}" + start-stop-daemon --signal HUP --pidfile ${PIDFILE} + eend $? + fi + done +} diff --git a/net-misc/tinc/files/tincd.conf b/net-misc/tinc/files/tincd.conf new file mode 100644 index 000000000000..cedca60c42ad --- /dev/null +++ b/net-misc/tinc/files/tincd.conf @@ -0,0 +1,20 @@ +#rc_need="net.net" + +#If you want tincd to log to syslog, then set this to "yes" +#Anything else and tincd will log to /var/log/tinc.NETNAME.log. +SYSLOG="yes" + +#Set debug level, useful for error probe +# 0 Quiet mode, only show starting/stopping of the daemon +# 1 Show (dis)connects of other tinc daemons via TCP +# 2 Show error messages received from other hosts +# 2 Show status messages received from other hosts +# 3 Show the requests that are sent/received +# 4 Show contents of every request that is sent/received +# 5 Show network traffic information +# 6 Show contents of each packet that is being sent/received +# 10 You have been warned +DEBUG_LEVEL="0" + +#Extra Options, if you want addtional customization +EXTRA_OPTS="" diff --git a/net-misc/tinc/files/tincd_at.service b/net-misc/tinc/files/tincd_at.service new file mode 100644 index 000000000000..71f358a39d95 --- /dev/null +++ b/net-misc/tinc/files/tincd_at.service @@ -0,0 +1,10 @@ +[Unit] +Description=Tinc daemon for network %i +After=network.target + +[Service] +ExecStart=/usr/sbin/tincd -D --pidfile /run/tinc.%i.pid -n %i +Restart=on-failure + +[Install] +WantedBy=multi-user.target |