diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-08-31 13:01:22 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-08-31 13:01:22 +0000 |
commit | f88b8c751f85970621321337aea2d9a8ed4ababe (patch) | |
tree | fc36da1ca43e4aafe90ba98e65e8cc8b6915fb10 /testing/vde2 | |
parent | 0e072046791fcedd6a3cb90704f610c5fd84ff2e (diff) | |
download | aports-f88b8c751f85970621321337aea2d9a8ed4ababe.tar.bz2 aports-f88b8c751f85970621321337aea2d9a8ed4ababe.tar.xz |
testing/vde2: add init.d scripts. fix config dir
Diffstat (limited to 'testing/vde2')
-rw-r--r-- | testing/vde2/APKBUILD | 22 | ||||
-rw-r--r-- | testing/vde2/vde.confd | 10 | ||||
-rw-r--r-- | testing/vde2/vde.initd | 26 |
3 files changed, 53 insertions, 5 deletions
diff --git a/testing/vde2/APKBUILD b/testing/vde2/APKBUILD index 195469cf0..706d9b765 100644 --- a/testing/vde2/APKBUILD +++ b/testing/vde2/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Michael Zhou <zhoumichaely@gmail.com> pkgname=vde2 pkgver=2.3.1 -pkgrel=1 +pkgrel=2 pkgdesc="VDE: Virtual Distributed Ethernet. User mode networking for QEMU, UML, etc." url="http://vde.sf.net" arch="all" @@ -9,6 +9,8 @@ license="GPL" depends="openssl" makedepends="openssl-dev libpcap-dev" source="http://downloads.sourceforge.net/project/vde/vde2/2.3.1/vde2-2.3.1.tar.gz + vde.initd + vde.confd " subpackages="$pkgname-doc $pkgname-dev" @@ -16,14 +18,24 @@ _builddir="$srcdir"/$pkgname-$pkgver build() { cd "$_builddir" - ./configure --prefix=/usr - make + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + || return 1 + make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 - rm "$pkgdir"/usr/lib/*.la + rm "$pkgdir"/usr/lib/*.la \ + "$pkgdir"/usr/lib/vde2/*.la \ + "$pkgdir"/usr/lib/vde2/*/*.la \ + || return 1 + + install -Dm755 "$srcdir"/vde.initd "$pkgdir"/etc/init.d/vde || return 1 + install -Dm644 "$srcdir"/vde.confd "$pkgdir"/etc/conf.d/vde || return 1 } -md5sums="c8c2acb92a72f779e0b484b1543a1cc3 vde2-2.3.1.tar.gz" +md5sums="c8c2acb92a72f779e0b484b1543a1cc3 vde2-2.3.1.tar.gz +21c1b8e841978461aa5c87b3f8abf01d vde.initd +318c787df292690c4da5b6ed83dc1893 vde.confd" diff --git a/testing/vde2/vde.confd b/testing/vde2/vde.confd new file mode 100644 index 000000000..d87945375 --- /dev/null +++ b/testing/vde2/vde.confd @@ -0,0 +1,10 @@ +# load the tun module +VDE_MODPROBE_TUN="yes" +# virtual tap networking device to be used for vde +VDE_TAP="tap0" +# mode and group for the socket +VDE_SOCK_CHMOD="770" +VDE_SOCK_CHOWN=":qemu" + +# This is the actual options string passed to VDE. Change this at your own risk. +VDE_OPTS="-tap ${VDE_TAP} -daemon" diff --git a/testing/vde2/vde.initd b/testing/vde2/vde.initd new file mode 100644 index 000000000..6400f9bbb --- /dev/null +++ b/testing/vde2/vde.initd @@ -0,0 +1,26 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/vde/files/vde.init,v 1.4 2010/01/12 12:58:36 dang Exp $ + +depend() { + after net.${VDE_TAP} +} + + +start() { + ebegin "Starting vde" + [ "${VDE_MODPROBE_TUN}" == "yes" ] && modprobe tun + start-stop-daemon --start --quiet \ + --exec /usr/bin/vde_switch -- ${VDE_OPTS} + eend $? "Failed to start vde" + chmod -R ${VDE_SOCK_CHMOD} /var/run/vde.ctl + chown -R ${VDE_SOCK_CHOWN} /var/run/vde.ctl +} + +stop() { + ebegin "Stopping vde" + [ "${VDE_MODPROBE_TUN}" == "yes" ] && modprobe -r tun + start-stop-daemon --stop --quiet --exec /usr/bin/vde_switch + eend $? "Failed to stop vde" +} |