summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Faulhammer <opfer@gentoo.org>2007-08-25 15:29:00 +0000
committerChristian Faulhammer <opfer@gentoo.org>2007-08-25 15:29:00 +0000
commit88e450b227d0955f29e28096d1ac1504f07bc1f1 (patch)
tree810d90ca795b511984e6444150030e72c50e273b /net-misc/vpnc
parentstable on x86. (diff)
downloadgentoo-2-88e450b227d0955f29e28096d1ac1504f07bc1f1.tar.gz
gentoo-2-88e450b227d0955f29e28096d1ac1504f07bc1f1.tar.bz2
gentoo-2-88e450b227d0955f29e28096d1ac1504f07bc1f1.zip
revision bump which installs a conf.d file to control whether output of vpnc's init script should be redirected to oblivion or not; requested by Gautam Iyer <gi1242@users.sourceforge.net> in bug 189867
(Portage version: 2.1.2.12)
Diffstat (limited to 'net-misc/vpnc')
-rw-r--r--net-misc/vpnc/ChangeLog10
-rw-r--r--net-misc/vpnc/files/digest-vpnc-0.4.0-r43
-rw-r--r--net-misc/vpnc/files/vpnc-1.init66
-rw-r--r--net-misc/vpnc/files/vpnc.confd4
-rw-r--r--net-misc/vpnc/vpnc-0.4.0-r4.ebuild45
5 files changed, 127 insertions, 1 deletions
diff --git a/net-misc/vpnc/ChangeLog b/net-misc/vpnc/ChangeLog
index 8ac596843a0a..c86757c8224b 100644
--- a/net-misc/vpnc/ChangeLog
+++ b/net-misc/vpnc/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-misc/vpnc
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/vpnc/ChangeLog,v 1.43 2007/08/19 12:22:06 nixnut Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/vpnc/ChangeLog,v 1.44 2007/08/25 15:29:00 opfer Exp $
+
+*vpnc-0.4.0-r4 (25 Aug 2007)
+
+ 25 Aug 2007; Christian Faulhammer <opfer@gentoo.org> +files/vpnc-1.init,
+ +files/vpnc.confd, +vpnc-0.4.0-r4.ebuild:
+ revision bump which installs a conf.d file to control whether output of
+ vpnc's init script should be redirected to oblivion or not; requested by
+ Gautam Iyer <gi1242@users.sourceforge.net> in bug 189867
19 Aug 2007; nixnut <nixnut@gentoo.org> vpnc-0.4.0-r3.ebuild:
Stable on ppc wrt bug 186577
diff --git a/net-misc/vpnc/files/digest-vpnc-0.4.0-r4 b/net-misc/vpnc/files/digest-vpnc-0.4.0-r4
new file mode 100644
index 000000000000..7945ee2ab04e
--- /dev/null
+++ b/net-misc/vpnc/files/digest-vpnc-0.4.0-r4
@@ -0,0 +1,3 @@
+MD5 604807e7dd90fce00a4e2344ee29c76d vpnc-0.4.0.tar.gz 75491
+RMD160 1640481601074d4517746f6e3b147b12f24b06e3 vpnc-0.4.0.tar.gz 75491
+SHA256 f91c6bc2547cb503fde4f244ba82304553fec3954c65521482f8db2491700586 vpnc-0.4.0.tar.gz 75491
diff --git a/net-misc/vpnc/files/vpnc-1.init b/net-misc/vpnc/files/vpnc-1.init
new file mode 100644
index 000000000000..cd96eb5373ff
--- /dev/null
+++ b/net-misc/vpnc/files/vpnc-1.init
@@ -0,0 +1,66 @@
+#!/sbin/runscript
+
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/vpnc/files/vpnc-1.init,v 1.1 2007/08/25 15:29:00 opfer Exp $
+
+VPNDIR="/etc/vpnc"
+VPN="${SVCNAME#*.}"
+if [ -n ${VPN} ] && [ ${SVCNAME} != "vpnc" ]; then
+ VPNPID="/var/run/vpnc/${VPN}.pid"
+else
+ VPNPID="/var/run/vpnc.pid"
+fi
+VPNCONF="${VPNDIR}/${VPN}.conf"
+
+depend() {
+ need net
+ before netmount
+}
+
+checktundevice() {
+ if [ ! -e /dev/net/tun ]; then
+ if ! modprobe tun ; then
+ eerror "TUN/TAP support is not available in this kernel"
+ return 1
+ fi
+ fi
+ if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
+ ebegin "Detected broken /dev/net/tun symlink, fixing..."
+ rm -f /dev/net/tun
+ ln -s /dev/misc/net/tun /dev/net/tun
+ eend $?
+ fi
+}
+
+screenoutput() {
+ if [ "${VPNCOUTPUT}" = "yes" ]; then
+ export SCREEN_OUTPUT="/dev/stdout"
+ elif [ "${VPNCOUTPUT}" = "no" ]; then
+ export SCREEN_OUTPUT="/dev/null"
+ fi
+}
+
+start() {
+ ebegin "Starting VPNC: ${VPN}"
+
+ checktundevice || return 1
+ screenoutput
+
+ if [ ! -e "${VPNCONF}" ]; then
+ eend 1 "${VPNCONF} does not exist"
+ return 1
+ fi
+
+ local args=""
+
+ start-stop-daemon --start --pidfile "${VPNPID}" --exec /usr/sbin/vpnc \
+ -- --pid-file "${VPNPID}" "${VPNCONF}" > ${SCREEN_OUTPUT}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping VPNC: ${VPN}"
+ start-stop-daemon --stop --exec /usr/sbin/vpnc --pidfile "${VPNPID}"
+ eend $?
+}
diff --git a/net-misc/vpnc/files/vpnc.confd b/net-misc/vpnc/files/vpnc.confd
new file mode 100644
index 000000000000..62789bd407ec
--- /dev/null
+++ b/net-misc/vpnc/files/vpnc.confd
@@ -0,0 +1,4 @@
+# If you wish to see the output made by vpnc, for example the password
+# prompt, set this variable to yes
+
+VPNCOUTPUT="no"
diff --git a/net-misc/vpnc/vpnc-0.4.0-r4.ebuild b/net-misc/vpnc/vpnc-0.4.0-r4.ebuild
new file mode 100644
index 000000000000..c1964e51e94d
--- /dev/null
+++ b/net-misc/vpnc/vpnc-0.4.0-r4.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/vpnc/vpnc-0.4.0-r4.ebuild,v 1.1 2007/08/25 15:29:00 opfer Exp $
+
+inherit eutils linux-info
+
+DESCRIPTION="Free client for Cisco VPN routing software"
+HOMEPAGE="http://www.unix-ag.uni-kl.de/~massar/vpnc/"
+SRC_URI="http://www.unix-ag.uni-kl.de/~massar/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+DEPEND=">=dev-libs/libgcrypt-1.1.91
+ >=sys-apps/iproute2-2.6.19.20061214"
+
+pkg_setup() {
+ local CONFIG_CHECK="TUN"
+ check_extra_config
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # not needed anymore with releases >0.4.0
+ epatch "${FILESDIR}"/${P}-build.patch
+}
+
+src_install() {
+ emake PREFIX="/usr" DESTDIR="${D}" install || die "emake install failed"
+ dodoc README TODO VERSION
+ keepdir /var/run/vpnc
+ dobin pcf2vpnc
+ dobin cisco-decrypt
+ newinitd "${FILESDIR}/vpnc-1.init" vpnc
+ newconfd "${FILESDIR}/vpnc.confd" vpnc
+}
+
+pkg_postinst() {
+ elog "You can generate a configuration file from the original Cisco profiles of your"
+ elog "connection by using /usr/bin/pcf2vpnc to convert the .pcf file"
+ elog "A guide is to be found in http://www.gentoo.org/doc/en/vpnc-howto.xml"
+}