From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R80vZ-0001dZ-Oy for garchives@archives.gentoo.org; Mon, 26 Sep 2011 02:28:17 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B9D8C21C2C6; Mon, 26 Sep 2011 02:27:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7B07021C2C6 for ; Mon, 26 Sep 2011 02:27:59 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 020161B40FE for ; Mon, 26 Sep 2011 02:27:59 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 07FA280042 for ; Mon, 26 Sep 2011 02:27:58 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: Subject: [gentoo-commits] dev/blueness:master commit in: net-misc/tinc/, net-misc/tinc/files/ X-VCS-Repository: dev/blueness X-VCS-Files: net-misc/tinc/ChangeLog net-misc/tinc/Manifest net-misc/tinc/files/tincd net-misc/tinc/files/tincd.conf net-misc/tinc/files/tincd.lo X-VCS-Directories: net-misc/tinc/ net-misc/tinc/files/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: ebc9f18d8d44f468e1e34fcc273c8cfed1ea006a Date: Mon, 26 Sep 2011 02:27:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 0357be1ceaed81d9921ac5daac17563d commit: ebc9f18d8d44f468e1e34fcc273c8cfed1ea006a Author: Anthony G. Basile gentoo org> AuthorDate: Mon Sep 26 02:27:51 2011 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Mon Sep 26 02:27:51 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/blueness.git;a= =3Dcommit;h=3Debc9f18d net-misc/tinc: cleaned up the init scripts --- net-misc/tinc/ChangeLog | 4 +++ net-misc/tinc/Manifest | 18 +++----------- net-misc/tinc/files/tincd | 35 +++++++++++++++-------------- net-misc/tinc/files/tincd.conf | 6 ++-- net-misc/tinc/files/tincd.lo | 48 +++++++++++++++++++++++++---------= ------ 5 files changed, 59 insertions(+), 52 deletions(-) diff --git a/net-misc/tinc/ChangeLog b/net-misc/tinc/ChangeLog index 1bfda10..3e06add 100644 --- a/net-misc/tinc/ChangeLog +++ b/net-misc/tinc/ChangeLog @@ -1,5 +1,9 @@ =20 =20 + 26 Sep 2011; Anthony G. Basile files/tincd, + files/tincd.conf, files/tincd.lo: + Cleaned up the init scripts + 26 Sep 2011; Anthony G. Basile tinc-1.0.16-r1.eb= uild, -files/tincdnosyslog, -files/tincdsyslog, files/tincd, files/tincd.con= f: Changed to toggle syslog on conf.d variable, bug #371357#c11 diff --git a/net-misc/tinc/Manifest b/net-misc/tinc/Manifest index e74b70c..8e3d769 100644 --- a/net-misc/tinc/Manifest +++ b/net-misc/tinc/Manifest @@ -1,18 +1,8 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - AUX tinc.networks 387 RMD160 cc842d8ab6fb137d87276553fbf7465baeccf871 SH= A1 8339d5882e494a0fd2390e1abfd0f24163949ce4 SHA256 7165721abd3706c9597311= 8fbb503e18f9a008da6bdbf21a4ce35ecf7818d5ad -AUX tincd 1768 RMD160 63fe4752d38c5a6b4dd2e6d3183985fd159076e8 SHA1 4229= d77ec8791ed5d4cd92b0a0088b5da4b61648 SHA256 0f841330fef6f27480bc71ddc950f= 372f447f986414f169e780b2f0c5ff889ed -AUX tincd.conf 140 RMD160 a8cb9f6c3076ec62c5d8b630e884ad84e77cfbec SHA1 = 2983aa5d70b693a00319b45d576d26519338ee53 SHA256 948aebf1d1f2b46cd4a8ac21f= 9983244504a291ad5b05d49583c37f8b529a43e -AUX tincd.lo 1174 RMD160 f3173005b3020712b6e6eae1f5d34825d5d08726 SHA1 7= daea8e502a2cf0abc80c510315ee53172f39a64 SHA256 ce3e150bc3822f197547058263= 65238401386de1f012f8665727111e11a8b175 +AUX tincd 1754 RMD160 689f1b30822a101a6f3e612fa56d8ea88f93ca65 SHA1 d012= 405de4eedc6c2ecb454ba2d3f1939a73f2eb SHA256 ff9b51f0aedb760d25acb2de1e181= 4603d4168ace8ee377e69eecbecaf365716 +AUX tincd.conf 157 RMD160 72e67087f4f88a4958a54eb8cf8270cdfebe4339 SHA1 = 82dda948f1982c9289d6732f20b7e0da33ca2f6a SHA256 eef883d3cf4ba8376f6b37518= f39df103b0d999c5faa2a82653926ce50255060 +AUX tincd.lo 1358 RMD160 ea70799c678490f9bf5729d3d97f27c05b409c7c SHA1 e= c77436c4d31f737967174c3057413f41aacfd4c SHA256 dfa94c22d415bbe71ff5df8382= 32100dfb7cbe3e6fe9578c935574cf0627d61e DIST tinc-1.0.16.tar.gz 519460 RMD160 a4d44bd90d4c19f4cc8bc27c1f92a8fb43= 7698d3 SHA1 6700e63c548228b1675f243f0075f98511f1e3a8 SHA256 f20863cb1155b= a4e4dd4cf16c35a5d706cd326eb8fe62b8b0a31fd57241a5400 EBUILD tinc-1.0.16-r1.ebuild 1000 RMD160 0752f0f125e53b32c165d662d707f45= 9428cd49a SHA1 29b5fa860889f94d3c6ae933b7a2752e4e5440e4 SHA256 3c333ae27d= 401bf726afdfb6e83ae27f2840d3b6fd722c838fe8362758bd9a6b -MISC ChangeLog 485 RMD160 884419631b449658ab20a654a557a35fa3e2fcc3 SHA1 = 74b33808d3a685e582e8144ab32a70c3a06959b7 SHA256 0c484bf5f1eb8ab88457a4550= f6a632dab38709d2e84ce814c72b523d850b199 +MISC ChangeLog 620 RMD160 fe4be2e228f773ed17d5b3d5a9cf6b42d19ebced SHA1 = 80db5feda129494e29bd20b2433d16713de7e20c SHA256 1145d5ff03215e993c64b0844= cdb1e30144b24165f4310ca8af70f5cea7a360e MISC metadata.xml 323 RMD160 4afa38944097d8968b63842a67ed19531f0d9ec4 SH= A1 40e3e0444e37634e1c939a5dd5677cef74827778 SHA256 8a800ba6f409642a732788= 2575dab780d140d7692155b5644850421abb7bb4d5 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.17 (GNU/Linux) - -iEYEAREIAAYFAk5/1XQACgkQl5yvQNBFVTWLOwCeMF47KzQACZAHyktRkOdR6kbg -6bYAn2BsygtCzGeFFRqunRnJ4pDtXpON -=3Dpb4G ------END PGP SIGNATURE----- diff --git a/net-misc/tinc/files/tincd b/net-misc/tinc/files/tincd index dfddf26..09f7090 100644 --- a/net-misc/tinc/files/tincd +++ b/net-misc/tinc/files/tincd @@ -5,7 +5,8 @@ =20 extra_commands=3D"reload" =20 -TINC_NETS=3D"/etc/conf.d/tinc.networks" +NETS=3D"/etc/conf.d/tinc.networks" +DAEMON=3D"/usr/sbin/tincd" =20 depend() { use logger dns @@ -13,8 +14,8 @@ depend() { } =20 checkconfig() { - if ! grep -q '^ *NETWORK:' "${TINC_NETS}" ; then - eerror "No VPN networks configured in ${TINC_NETS}" + if ! grep -q '^ *NETWORK:' "${NETS}" ; then + eerror "No VPN networks configured in ${NETS}" return 1 fi } @@ -22,21 +23,21 @@ checkconfig() { start() { checkconfig || return 1 ebegin "Starting tinc VPN networks" - awk '/^ *NETWORK:/ { print $2 }' "${TINC_NETS}" | while read TINCNET + awk '/^ *NETWORK:/ { print $2 }' "${NETS}" | while read NETNAME do - CONFIG=3D"/etc/tinc/${TINCNET}/tinc.conf" - PIDFILE=3D"/var/run/tinc.${TINCNET}.pid" + CONFIG=3D"/etc/tinc/${NETNAME}/tinc.conf" + PIDFILE=3D"/var/run/tinc.${NETNAME}.pid" if [ ! -f "${CONFIG}" ]; then - eerror "Cannot start network ${TINCNET}." + eerror "Cannot start network ${NETNAME}." eerror "Please set up ${CONFIG} !" else - ebegin "Starting tinc network ${TINCNET}" - if [ "${TINC_SYSLOG}" =3D=3D "yes" ]; then - LOG=3D" --logfile=3D/var/log/tinc.${TINCNET}.log" + ebegin "Starting tinc network ${NETNAME}" + if [ "${SYSLOG}" =3D=3D "yes" ]; then + LOG=3D" --logfile=3D/var/log/tinc.${NETNAME}.log" else LOG=3D"" fi - start-stop-daemon --start --exec /usr/sbin/tincd -- --net=3D"${TINCNE= T}" "${LOG}" --pidfile "${PIDFILE}" + start-stop-daemon --start --exec "${DAEMON}" -- --net=3D"${NETNAME}" = "${LOG}" --pidfile "${PIDFILE}" eend $? fi done @@ -44,11 +45,11 @@ start() { =20 stop() { ebegin "Stopping tinc VPN networks" - awk '/^ *NETWORK:/ { print $2 }' "${TINC_NETS}" | while read TINCNET + awk '/^ *NETWORK:/ { print $2 }' "${NETS}" | while read NETNAME do - PIDFILE=3D"/var/run/tinc.${TINCNET}.pid" + PIDFILE=3D"/var/run/tinc.${NETNAME}.pid" if [ -f "${PIDFILE}" ]; then - ebegin "Stopping tinc network ${TINCNET}" + ebegin "Stopping tinc network ${NETNAME}" start-stop-daemon --stop --pidfile "${PIDFILE}" eend $? fi @@ -57,11 +58,11 @@ stop() { =20 reload() { ebegin "Reloading configuration for tinc VPN networks" - awk '/^ *NETWORK:/ { print $2 }' "${TINC_NETS}" | while read TINCNET + awk '/^ *NETWORK:/ { print $2 }' "${NETS}" | while read NETNAME do - PIDFILE=3D"/var/run/tinc.${TINCNET}.pid" + PIDFILE=3D"/var/run/tinc.${NETNAME}.pid" if [ -f "${PIDFILE}" ]; then - ebegin "Reloading tinc network ${TINCNET}" + ebegin "Reloading tinc network ${NETNAME}" start-stop-daemon --signal HUP --pidfile ${PIDFILE} eend $? fi diff --git a/net-misc/tinc/files/tincd.conf b/net-misc/tinc/files/tincd.c= onf index 65d6907..0394702 100644 --- a/net-misc/tinc/files/tincd.conf +++ b/net-misc/tinc/files/tincd.conf @@ -1,5 +1,5 @@ #rc_need=3D"net.net" =20 -#If you want TINC to log to syslog, then set this to "yes" -#Anything else and tincd will log to FIXME -TINC_SYSLOG=3D"yes" +#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=3D"yes" diff --git a/net-misc/tinc/files/tincd.lo b/net-misc/tinc/files/tincd.lo index 4b5dde6..2a2e864 100644 --- a/net-misc/tinc/files/tincd.lo +++ b/net-misc/tinc/files/tincd.lo @@ -3,7 +3,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-misc/tinc/files/tincd.lo,v 1.1 20= 10/07/18 10:04:56 dragonheart Exp $ =20 -opts=3D"reload" +extra_commands=3D"reload" + +DAEMON=3D"/usr/sbin/tincd" =20 depend() { @@ -13,34 +15,44 @@ depend() =20 start() { - TINCNET=3D${RC_SVCNAME#*.} - if [ -f /etc/tinc/"$TINCNET"/tinc.conf ] ; then - ebegin "Starting tinc network $TINCNET" - /usr/sbin/tincd --debug=3D1 --net=3D"$TINCNET" --logfile=3D/var/log/ti= nc.$TINCNET.log --pidfile=3D/var/run/tinc.$TINCNET.pid - eend $? + NETNAME=3D"${RC_SVCNAME#*.}" + CONFIG=3D"/etc/tinc/${NETNAME}/tinc.conf" + PIDFILE=3D"/var/run/tinc.${NETNAME}.pid" + if [ ! -f "${CONFIG}" ]; then + eerror "Cannot start network ${NETNAME}." + eerror "Please set up ${CONFIG} !" else - eerror "Cannot start network $TINCNET, /etc/tinc/$TINCNET/tinc.conf do= es not exist !" + ebegin "Starting tinc network $NETNAME" + if [ "${SYSLOG}" =3D=3D "yes" ]; then + LOG=3D" --logfile=3D/var/log/tinc.${NETNAME}.log" + else + LOG=3D"" + fi + start-stop-daemon --start --exec "${DAEMON}" -- --net=3D"${NETNAME}" "= ${LOG}" --pidfile "${PIDFILE}" + eend $? fi } =20 stop() { - TINCNET=3D${RC_SVCNAME#*.} - if [ -f /var/run/tinc."$TINCNET".pid ] ; then - ebegin "Stopping tinc network $TINCNET" - /usr/sbin/tincd --kill --pidfile=3D/var/run/tinc."$TINCNET".pid + NETNAME=3D"${RC_SVCNAME#*.}" + CONFIG=3D"/etc/tinc/${NETNAME}/tinc.conf" + PIDFILE=3D"/var/run/tinc.${NETNAME}.pid" + if [ -f "${PIDFILE}" ] ; then + ebegin "Stopping tinc network ${NETNAME}" + start-stop-daemon --stop --pidfile "${PIDFILE}" eend $? - else - eerror "Cannot start network $TINCNET, /etc/tinc/$TINCNET/tinc.conf do= es not exist !" fi } =20 reload() { - TINCNET=3D${RC_SVCNAME#*.} - if [ -f /var/run/tinc."$TINCNET".pid ] ; then - ebegin "Reloading configuration for tinc network $TINCNET" - /usr/sbin/tincd --kill HUP --pidfile=3D/var/run/tinc."$TINCNET".pid - eend $? + NETNAME=3D${RC_SVCNAME#*.} + CONFIG=3D"/etc/tinc/${NETNAME}/tinc.conf" + PIDFILE=3D"/var/run/tinc.${NETNAME}.pid" + if [ -f "${PIDFILE}" ] ; then + ebegin "Reloading tinc network ${NETNAME}" + start-stop-daemon --signal HUP --pidfile "${PIDFILE}" + eend $? fi }