summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-03-15 16:37:33 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-03-15 16:37:33 +0000
commit8ddd1d64533f42a551e8bbe423ab2f9aff6da7ba (patch)
treee58ec2201a8cedf86f65669bb44ed84f4d0910cd
parentd8bb74e692879c48f0042e672f2c43a1e39a5b62 (diff)
downloadaports-8ddd1d64533f42a551e8bbe423ab2f9aff6da7ba.tar.bz2
aports-8ddd1d64533f42a551e8bbe423ab2f9aff6da7ba.tar.xz
main/vde2: remove the init.d scripts and create vde2-net group
We only support the ifup/down network style for this from now on.
-rw-r--r--main/vde2/APKBUILD9
-rw-r--r--main/vde2/vde.confd10
-rw-r--r--main/vde2/vde.initd26
-rw-r--r--main/vde2/vde2.pre-install6
4 files changed, 8 insertions, 43 deletions
diff --git a/main/vde2/APKBUILD b/main/vde2/APKBUILD
index 3fadb284b..38e994f7c 100644
--- a/main/vde2/APKBUILD
+++ b/main/vde2/APKBUILD
@@ -1,17 +1,16 @@
# Maintainer: Michael Zhou <zhoumichaely@gmail.com>
pkgname=vde2
pkgver=2.3.1
-pkgrel=4
+pkgrel=5
pkgdesc="VDE: Virtual Distributed Ethernet. User mode networking for QEMU, UML, etc."
url="http://vde.sf.net"
arch="all"
license="GPL"
depends="openssl"
+install="vde2.pre-install"
makedepends="openssl-dev libpcap-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs"
source="http://downloads.sourceforge.net/project/vde/vde2/2.3.1/vde2-2.3.1.tar.gz
- vde.initd
- vde.confd
vde2.pre-up
vde2.post-down
"
@@ -34,8 +33,6 @@ package() {
"$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
install -Dm755 "$srcdir"/vde2.pre-up \
"$pkgdir"/etc/network/if-pre-up.d/vde2 || return 1
install -Dm755 "$srcdir"/vde2.post-down \
@@ -49,7 +46,5 @@ libs() {
}
md5sums="c8c2acb92a72f779e0b484b1543a1cc3 vde2-2.3.1.tar.gz
-21c1b8e841978461aa5c87b3f8abf01d vde.initd
-318c787df292690c4da5b6ed83dc1893 vde.confd
e484324d93baf668d7ec756f36ebf389 vde2.pre-up
d9a32a3e77e64a265e00df5ab1081672 vde2.post-down"
diff --git a/main/vde2/vde.confd b/main/vde2/vde.confd
deleted file mode 100644
index d87945375..000000000
--- a/main/vde2/vde.confd
+++ /dev/null
@@ -1,10 +0,0 @@
-# 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/main/vde2/vde.initd b/main/vde2/vde.initd
deleted file mode 100644
index 6400f9bbb..000000000
--- a/main/vde2/vde.initd
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/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"
-}
diff --git a/main/vde2/vde2.pre-install b/main/vde2/vde2.pre-install
new file mode 100644
index 000000000..7548397d3
--- /dev/null
+++ b/main/vde2/vde2.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S vde2-net 2>/dev/null
+adduser -S -h /var/run/vde2 -s /bin/false -G vde2-net -D -H vde2-net 2>/dev/null
+
+exit 0