From: fbrehm Date: Tue, 6 Mar 2012 16:14:29 +0000 (+0100) Subject: committing changes in /etc after emerge run X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=9ebfca5eb1128b678879b2c67548ff930eeb7924;p=config%2Fsamara%2Fetc.git committing changes in /etc after emerge run Package changes: +net-misc/vde-2.2.2 --- diff --git a/.etckeeper b/.etckeeper index 34c6bc0..521cac9 100755 --- a/.etckeeper +++ b/.etckeeper @@ -278,6 +278,7 @@ maybe chmod 0644 './conf.d/timidity' maybe chmod 0644 './conf.d/twistd' maybe chmod 0644 './conf.d/udev' maybe chmod 0644 './conf.d/urandom' +maybe chmod 0644 './conf.d/vde' maybe chmod 0644 './conf.d/wpa_supplicant' maybe chmod 0644 './conf.d/xdm' maybe chmod 0644 './conf.d/xinetd' @@ -1032,6 +1033,7 @@ maybe chmod 0755 './init.d/udev-mount' maybe chmod 0755 './init.d/udev-postmount' maybe chmod 0755 './init.d/ulogd' maybe chmod 0755 './init.d/urandom' +maybe chmod 0755 './init.d/vde' maybe chmod 0755 './init.d/vixie-cron' maybe chmod 0755 './init.d/wpa_supplicant' maybe chmod 0755 './init.d/xdm' @@ -1737,6 +1739,13 @@ maybe chmod 0755 './update-motd.d/99-footer' maybe chmod 0644 './updatedb.conf' maybe chmod 0755 './vbox' maybe chmod 0644 './vbox/vbox.cfg' +maybe chmod 0755 './vde2' +maybe chmod 0755 './vde2/libvdemgmt' +maybe chmod 0644 './vde2/libvdemgmt/asyncrecv.rc' +maybe chmod 0644 './vde2/libvdemgmt/closemachine.rc' +maybe chmod 0644 './vde2/libvdemgmt/openmachine.rc' +maybe chmod 0644 './vde2/libvdemgmt/sendcmd.rc' +maybe chmod 0644 './vde2/vdecmd' maybe chmod 0755 './vim' maybe chmod 0644 './vim/gvimrc' maybe chmod 0644 './vim/vimrc' diff --git a/conf.d/vde b/conf.d/vde new file mode 100644 index 0000000..d879453 --- /dev/null +++ b/conf.d/vde @@ -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/init.d/vde b/init.d/vde new file mode 100755 index 0000000..6400f9b --- /dev/null +++ b/init.d/vde @@ -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" +} diff --git a/vde2/libvdemgmt/asyncrecv.rc b/vde2/libvdemgmt/asyncrecv.rc new file mode 100644 index 0000000..8ad6d21 --- /dev/null +++ b/vde2/libvdemgmt/asyncrecv.rc @@ -0,0 +1,12 @@ +TIMEOUT 1000 +1 IN '\n' 100 +2 IF '30' 10 +3 GOTO 100 + +10 COPY +11 SKIP 2 +12 RVATOI 8 +13 EXITRV + +100 EXIT -1 + diff --git a/vde2/libvdemgmt/closemachine.rc b/vde2/libvdemgmt/closemachine.rc new file mode 100644 index 0000000..3cffc73 --- /dev/null +++ b/vde2/libvdemgmt/closemachine.rc @@ -0,0 +1,2 @@ +1 SEND 'logout\n' +2 EXIT 0 diff --git a/vde2/libvdemgmt/openmachine.rc b/vde2/libvdemgmt/openmachine.rc new file mode 100644 index 0000000..084605e --- /dev/null +++ b/vde2/libvdemgmt/openmachine.rc @@ -0,0 +1,6 @@ +TIMEOUT 1000 +1 IN '$ ' 100 +2 COPY +3 EXIT 0 + +100 EXIT -1 diff --git a/vde2/libvdemgmt/sendcmd.rc b/vde2/libvdemgmt/sendcmd.rc new file mode 100644 index 0000000..7b037b5 --- /dev/null +++ b/vde2/libvdemgmt/sendcmd.rc @@ -0,0 +1,40 @@ +TIMEOUT 1000 +1 SEND '$*\n' +2 THROW +3 IN '\n' 100 +4 IF '30' 10 +5 IF '10' 20 +6 IF '0000 DATA END WITH \'.\'' 30 +7 GOTO 2 + +10 SKIP 5 +11 COPY +13 OUTTAG 3 +14 OUTSHIFT +15 GOTO 2 + +20 SKIP 2 +21 RVATOI +22 THROW +23 IN '$ ' 100 +24 IF '30' 40 +25 EXITRV + +30 THROW +31 IN '\n' 100 +32 IF '.\n' 35 +33 COPY +34 GOTO 30 +35 OUTTAG 1 +36 OUTSHIFT +37 GOTO 2 + +40 SKIP 5 +41 COPY +42 OUTTAG 3 +43 OUTSHIFT +44 SKIP '\n' +45 GOTO 24 + +100 EXIT -1 + diff --git a/vde2/vdecmd b/vde2/vdecmd new file mode 100644 index 0000000..c588f30 --- /dev/null +++ b/vde2/vdecmd @@ -0,0 +1,17 @@ +TIMEOUT 1000 +1 IN '$ ' 100 +3 SEND '$*\n' +5 THROW +6 IN '\n' 100 +7 IF '0000 DATA END WITH \'.\'' 10 +8 IF '10' 20 +9 GOTO 100 +10 THROW +11 IN '\n' 100 +12 IF '.\n' 5 +13 COPY +14 GOTO 10 +20 SKIP 2 +21 SEND 'logout\n' +22 EXITATOI +100 EXIT -1