diff options
author | root <root@rshg054.dnsready.net> | 2013-05-21 00:28:39 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-05-21 00:28:39 -0700 |
commit | e3f225daecfd5cfea4af1a4e8ac4b6c46c7ec363 (patch) | |
tree | b3e36d93c34b5b08544b1698462c06fdb99560b8 /extra/vde2 | |
parent | 383955a81810f344e11b1472bd4c5069fa77020c (diff) |
Tue May 21 00:28:39 PDT 2013
Diffstat (limited to 'extra/vde2')
-rw-r--r-- | extra/vde2/PKGBUILD | 19 | ||||
-rw-r--r-- | extra/vde2/vde.conf | 11 | ||||
-rwxr-xr-x | extra/vde2/vde.rc | 113 | ||||
-rw-r--r-- | extra/vde2/vde2.install | 1 |
4 files changed, 6 insertions, 138 deletions
diff --git a/extra/vde2/PKGBUILD b/extra/vde2/PKGBUILD index bb25037ab..c6f12a215 100644 --- a/extra/vde2/PKGBUILD +++ b/extra/vde2/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 169040 2012-10-17 10:21:21Z allan $ +# $Id: PKGBUILD 185995 2013-05-20 07:12:08Z tpowa $ # Contributor: Sergej Pupykin # Maintainer: Tobias Powalowski <tpowa@archlinux.org> pkgname=vde2 pkgver=2.3.2 -pkgrel=2 +pkgrel=3 pkgdesc="Virtual Distributed Ethernet for emulators like qemu" url="http://sourceforge.net/projects/vde/" license=("GPL" "LGPL" "CUSTOM") @@ -15,24 +15,20 @@ source=(http://downloads.sourceforge.net/vde/$pkgname-$pkgver.tar.bz2 dhcpd.conf.sample iptables.rules.sample vde-config.sample - vde-connection.sample - vde.conf - vde.rc) + vde-connection.sample) install=vde2.install options=(!libtool !makeflags) build() { cd $srcdir/$pkgname-$pkgver - ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/vde2 \ + ./configure --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc --libexecdir=/usr/lib/vde2 \ --enable-experimental make } package() { cd $srcdir/$pkgname-$pkgver - make prefix=$pkgdir/usr sysconfdir=$pkgdir/etc libexecdir=$pkgdir/usr/lib/vde2 install - install -D -m 755 ../vde.rc $pkgdir/etc/rc.d/vde - install -D -m 644 ../vde.conf $pkgdir/etc/conf.d/vde + make prefix=$pkgdir/usr sysconfdir=$pkgdir/etc sbindir=$pkgdir/usr/bin libexecdir=$pkgdir/usr/lib/vde2 install install -D -m 644 ../vde-config.sample $pkgdir/etc/vde/vde-config.sample install -D -m 644 ../vde-connection.sample $pkgdir/etc/vde/vde-connection.sample install -D -m 644 ../dhcpd.conf.sample $pkgdir/usr/share/vde2/dhcpd.conf.sample @@ -40,11 +36,8 @@ package() { # install slirp license install -D -m 644 COPYING.slirpvde $pkgdir/usr/share/licenses/vde2/COPYING.slirpvde } - md5sums=('46fbc5f97f03dc517aa3b2c9d9ea6628' '7d9bc56d2e561d849e915000d1c0f269' 'a920123fc620bcedbccb703a8d1bdc55' 'cb8ace28e8efd4dad128be4be71b3b07' - '63033c33565e2030541c5e05e9d9b063' - 'a22730f051f4840da4a3162a88ff8156' - '6c7dc01bc2f039f0ff1682ee70d3d1da') + '63033c33565e2030541c5e05e9d9b063') diff --git a/extra/vde2/vde.conf b/extra/vde2/vde.conf deleted file mode 100644 index bc61dceda..000000000 --- a/extra/vde2/vde.conf +++ /dev/null @@ -1,11 +0,0 @@ -# Set options for a vde daemon script -# -# Array for your vde config files, eg.: "internal-net external-net" -# You need a config file in /etc/vde/ with the same name. -# Sample config file provided: /etc/vde/vde-config.sample -VDE_CONFIG="" - -# Array for your dpipe connections, eg.: "connect-switches" -# You need a config file in /etc/vde/ with the same name. -# Sample config file provided: /etc/vde/vde-connection.sample -VDE_CONNECTION=""
\ No newline at end of file diff --git a/extra/vde2/vde.rc b/extra/vde2/vde.rc deleted file mode 100755 index b368f9955..000000000 --- a/extra/vde2/vde.rc +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions -. /etc/conf.d/vde - -case "$1" in - start) - # bring up all defined profiles - for i in $VDE_CONFIG; do - [ -e /etc/vde/$i ] && . /etc/vde/$i - stat_busy "Starting vde_switch $i" - # get options from profile - [ -n "$VDE_NUMPORTS" ] && OPTIONS="-n $VDE_NUMPORTS" - [ "$VDE_HUB" = "yes" ] && OPTIONS="$OPTIONS -x" - [ "$VDE_FSTP" = "yes" ] && OPTIONS="$OPTIONS -F" - [ -n "$VDE_MAC" ] && OPTIONS="$OPTIONS --macaddr $VDE_MAC" - [ -n "$VDE_PRIORITY" ] && OPTIONS="$OPTIONS --priority $VDE_PRIORITY" - [ -n "$VDE_HASH" ] && OPTIONS="$OPTIONS --hashsize $VDE_HASH" - [ -n "$VDE_SOCK" ] && OPTIONS="$OPTIONS -s $VDE_SOCK" - [ -n "$VDE_SOCK_MODE" ] && OPTIONS="$OPTIONS -m $VDE_SOCK_MODE" - [ -n "$VDE_SOCK_GROUP" ] && OPTIONS="$OPTIONS -g $VDE_SOCK_GROUP" - [ -n "$VDE_MANAGEMENT_SOCK" ] && OPTIONS="$OPTIONS -M $VDE_MANAGEMENT_SOCK" - [ -n "$VDE_MANAGEMENT_SOCK_MODE" ] && OPTIONS="$OPTIONS --mgmtmode $VDE_MANAGEMENT_SOCK_MODE" - [ -n "$VDE_TAP" ] && OPTIONS="$OPTIONS -t $VDE_TAP" - [ -n "$VDE_OPTIONS" ] && OPTIONS="$OPTIONS $VDE_OPTIONS" - vde_switch $OPTIONS -p /var/run/vde-$i.pid -daemon &>/dev/null - [ -n "$VDE_SOCK" -a -n "$VDE_SOCK_GROUP" ] && chgrp "$VDE_SOCK_GROUP" "$VDE_SOCK" - if [ $? -gt 0 ]; then - stat_fail - else - stat_done - fi - if [ "$SLIRP" = "yes" ]; then - stat_busy "Starting slirpvde for $i" - [ "$SLIRP_DHCP" = "yes" ] && SP_OPTIONS="-D" - [ -n "$SLIRP_NETWORK" ] && SP_OPTIONS="$SP_OPTIONS -n $SLIRP_NETWORK" - [ -n "$SLIRP_OPTIONS" ] && SP_OPTIONS="$SP_OPTIONS $SLIRP_OPTIONS" - [ -n "$VDE_SOCK" ] && SP_OPTIONS="$SP_OPTIONS -s $VDE_SOCK" - [ -n "$VDE_SOCK_MODE" ] && SP_OPTIONS="$SP_OPTIONS -m $VDE_SOCK_MODE" - [ -n "$VDE_SOCK_GROUP" ] && SP_OPTIONS="$SP_OPTIONS -g $VDE_SOCK_GROUP" - slirpvde $SP_OPTIONS -p /var/run/slirpvde-$i.pid -daemon &>/dev/null - if [ $? -gt 0 ]; then - stat_fail - else - stat_done - fi - unset OPTIONS - unset SP_OPTIONS - fi - done - for i in $VDE_CONNECTION; do - # connect specified vde_switches - if [ "$(grep ^vde_plug /etc/vde/$i)" ]; then - stat_busy "Connecting VDE switches $i together..." - while read j; do - switch="$(echo $j | grep ^vde_plug)" - [ -n "$switch" ] && (dpipe $switch &) - done </etc/vde/$i - if [ $? -gt 0 ]; then - stat_fail - else - stat_done - fi - fi - done - add_daemon vde - ;; - stop) - # kill vde_plug if switches are connected - [ -n "$VDE_CONNECTION" ] && killall vde_plug >/dev/null 2>&1 - for i in $VDE_CONFIG; do - [ -e /etc/vde/$i ] && . /etc/vde/$i - if [ "$SLIRP" = "yes" ]; then - stat_busy "Stopping slirpvde for $i" - kill $(cat /var/run/slirpvde-$i.pid) &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - stat_done - fi - rm /var/run/slirpvde-$i.pid &> /dev/null - fi - stat_busy "Stopping vde_switch $i" - kill $(cat /var/run/vde-$i.pid) &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - stat_done - fi - rm /var/run/vde-$i.pid &> /dev/null - stat_busy "Removing $i vde sockets" - rm -rf $VDE_SOCK $VDE_MANAGEMENT_SOCK - if [ $? -gt 0 ]; then - stat_fail - else - stat_done - fi - done - unset OPTIONS - unset SP_OPTIONS - [ -e /var/run/vde/gmon.out ] && rm /var/run/vde/gmon.out - rm_daemon vde - ;; - restart) - $0 stop - sleep 3 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 diff --git a/extra/vde2/vde2.install b/extra/vde2/vde2.install index 74e1710ff..bf538e01f 100644 --- a/extra/vde2/vde2.install +++ b/extra/vde2/vde2.install @@ -1,5 +1,4 @@ post_install() { - echo "Change /etc/conf.d/vde to your needs." echo "vde config files should be placed in /etc/vde, sample files are provided." echo "iptables and dhcpd sample files have been installed to '/usr/share/vde2'." echo "Merge those examples, if needed to the according config files." |