[Pkg-vsquare-changes] r84 - in vde2/trunk/debian: .
network/if-post-down.d network/if-pre-up.d
Filippo Giunchedi
filippo at alioth.debian.org
Thu Apr 19 13:08:15 UTC 2007
Author: filippo
Date: 2007-04-19 13:08:15 +0000 (Thu, 19 Apr 2007)
New Revision: 84
Modified:
vde2/trunk/debian/README.Debian
vde2/trunk/debian/changelog
vde2/trunk/debian/network/if-post-down.d/vde2
vde2/trunk/debian/network/if-pre-up.d/vde2
Log:
enhance ifupdown support for "manual" method + documentation
Modified: vde2/trunk/debian/README.Debian
===================================================================
--- vde2/trunk/debian/README.Debian 2007-04-16 13:06:59 UTC (rev 83)
+++ vde2/trunk/debian/README.Debian 2007-04-19 13:08:15 UTC (rev 84)
@@ -1,32 +1,43 @@
vde2 for Debian
---------------
+VDE usage from /etc/network/interfaces
-/etc/network/interfaces
-
The Debian package provides an extension for iface sections in
/etc/network/interfaces file:
* vde2-switch -|<parameters>
Start TAP interface with vde_switch command which has control directory
- /var/run/vde/$IFACE.ctl. The control directory is writtable by vde2-net
+ /var/run/vde/$IFACE.ctl. The control directory is writable by vde2-net
group. The additional parameters might be --macaddr MAC for switch MAC
address or other parameters. Call `vde_switch --help' for description.
-
+
+ When using the "manual" method of ifupdown no TAP interface will be
+ attached to the switch, instead only unix socket connectivity will be
+ present, e.g.:
+
+ auto vde0
+ iface vde0 inet manual
+ vde2-switch -
+
+ will start a vde_switch on virtual interface vde0 at every boot, see ifup(8).
+ In this case vde0 is used for future reference, for example management
+ socket can be accessed from /var/run/vde2/vde0.mgmt
+
* vde2-slirp -|<parameters>
- Start Slirp interface connected to the VDE switch with slirpvde command.
+ Start slirp interface connected to the VDE switch with slirpvde command.
The additional parameter might be -dhcp for DHCP
server or -netaddr to specify the network address (default 10.0.2.0).
Call `slirpvde --help' for description.
* vde2-plug <dpipe_arg2>
- Start VDE plug to be connected into a VDE switch controled by TAP device
+ Start VDE plug to be connected into a VDE switch controlled by TAP device
and other switch called by second argument of dpipe command.
- I.e.
+ i.e.
The command
@@ -172,7 +183,7 @@
In this case the networking is available only inside virtual machines.
- Managment console
+ Management console
-----------------
You can connect to remote console with unixterm command:
Modified: vde2/trunk/debian/changelog
===================================================================
--- vde2/trunk/debian/changelog 2007-04-16 13:06:59 UTC (rev 83)
+++ vde2/trunk/debian/changelog 2007-04-19 13:08:15 UTC (rev 84)
@@ -8,8 +8,10 @@
* do not check on interface's name being tap*, ignore interface if there are
no actual vde2-* parameters, thanks Raphael (Closes: #418065)
* fix README.Debian mispelled vde-net group (Closes: #419513)
+ * document ifupdown "manual" method usage in README.Debian and fix
+ if-pre-up.d/vde2
- -- Filippo Giunchedi <filippo at debian.org> Mon, 16 Apr 2007 15:03:17 +0200
+ -- Filippo Giunchedi <filippo at debian.org> Wed, 18 Apr 2007 21:40:54 +0200
vde2 (2.1.6-1) unstable; urgency=low
Modified: vde2/trunk/debian/network/if-post-down.d/vde2
===================================================================
--- vde2/trunk/debian/network/if-post-down.d/vde2 2007-04-16 13:06:59 UTC (rev 83)
+++ vde2/trunk/debian/network/if-post-down.d/vde2 2007-04-19 13:08:15 UTC (rev 84)
@@ -14,9 +14,9 @@
CTLFILE="/var/run/vde2/$IFACE.ctl"
if [ -f $PIDFILE ]; then
if [ -x $DAEMON ]; then
- $DAEMON -n "vde2_plug_$IFACE" -F $PIDFILE --stop
+ $DAEMON -n "vde2_plug_$IFACE" -F $PIDFILE --stop
else
- start-stop-daemon --stop --quiet --pidfile $PIDFILE
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE
fi
rm -f $PIDFILE
fi
Modified: vde2/trunk/debian/network/if-pre-up.d/vde2
===================================================================
--- vde2/trunk/debian/network/if-pre-up.d/vde2 2007-04-16 13:06:59 UTC (rev 83)
+++ vde2/trunk/debian/network/if-pre-up.d/vde2 2007-04-19 13:08:15 UTC (rev 84)
@@ -19,7 +19,7 @@
fi
# Create directory if missing
-if ! [ -d /var/run/vde2 ]; then
+if [ ! -d /var/run/vde2 ]; then
mkdir -p /var/run/vde2
chown vde2-net:vde2-net /var/run/vde2
chmod 2770 /var/run/vde2
@@ -32,9 +32,16 @@
PIDFILE="/var/run/vde2/$IFACE.pid"
CTLDIR="/var/run/vde2/$IFACE.ctl"
MGMTFILE="/var/run/vde2/$IFACE.mgmt"
+
+ if [ "$METHOD" = "manual" ]; then
+ TAPOPTS=""
+ else
+ TAPOPTS="-t $IFACE"
+ fi
+
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--exec $VDE_SWITCH -- \
- -s $CTLDIR -m 660 -g $GROUP -p $PIDFILE -t $IFACE \
+ -s $CTLDIR -m 660 -g $GROUP -p $PIDFILE $TAPOPTS \
-M $MGMTFILE --mgmtmode 660 -d "$@"
fi
@@ -43,12 +50,13 @@
set -- $IF_VDE2_PLUG
PIDFILE="/var/run/vde2/$IFACE-plug.pid"
CTLDIR="/var/run/vde2/$IFACE.ctl"
+
if [ -x $DAEMON ]; then
- $DAEMON -n "vde2_plug_$IFACE" -F $PIDFILE -- $DPIPE $VDE_PLUG -g vde2-net -m 660 $CTLDIR = "$@"
+ $DAEMON -n "vde2_plug_$IFACE" -F $PIDFILE -- $DPIPE $VDE_PLUG -g vde2-net -m 660 $CTLDIR = "$@"
else
- start-stop-daemon --start --quiet --pidfile $PIDFILE \
- --make-pidfile --background \
- --exec $DPIPE -- $VDE_PLUG -g $GROUP -m 660 $CTLDIR = "$@"
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --make-pidfile --background \
+ --exec $DPIPE -- $VDE_PLUG -g $GROUP -m 660 $CTLDIR = "$@"
fi
fi
@@ -58,6 +66,7 @@
test "$1" = "-" && shift
PIDFILE="/var/run/vde2/$IFACE-slirp.pid"
CTLDIR="/var/run/vde2/$IFACE.ctl"
+
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--chuid $USER \
--exec $SLIRPVDE -- \
More information about the Pkg-vsquare-changes
mailing list