[Pkg-virtualbox-devel] Bug#507169: Bug#507169: virtualbox-ose: vb-ose don't

Anton M Serov a.serov at limonit.org
Sat Nov 29 18:00:20 UTC 2008


On Saturday 29 November 2008 22:22:53 Michael Meskes wrote:
> On Sat, Nov 29, 2008 at 12:41:47AM +0600, Anton M. Serov wrote:
> > virtualbox ose doesn't make a call of tap-network-interface add/remove
> > scripts. i've defined:
> > /usr/bin/vm-iface add 1
> > /usr/bin/vm-iface remove 1
>
> Ehem, you defined these scripts where?
> And why should virtualbox-ose use them?
>
> Michael

Please look at the screenshot attached.


$ dpkg -S `which virtualbox` ; file `which vm-iface` ; cat `which vm-iface`
virtualbox-ose: /usr/bin/virtualbox
/usr/bin/vm-iface: Bourne-Again shell script text executable
#!/bin/bash

TUNCTL=/usr/sbin/tunctl
BRCTL=/usr/sbin/brctl
SUDO=/usr/bin/sudo
IP=/bin/ip
BRIF=br0

usage() {
        echo -e "\n\tUsage:\t$0 <add|start|remove|stop> <tun-iface_number>\n" 
1>&2
}

case "$1" in
        add|start)
                if [ ! -z "$2" ] ; then
                        MKTAPCMD="$SUDO $TUNCTL -t tap$2 -u $USER"
                        $MKTAPCMD
                        echo $MKTAPCMD > ~/vm
                        $IP link set up dev tap$2
                        $SUDO $BRCTL addif $BRIF tap$2
                else
                        usage
                        exit 1
                fi
        ;;
        remove|stop)
                if [ ! -z "$2" ] ; then
                        $SUDO $BRCTL delif $BRIF tap$2
                        $IP link set down dev tap$2
                        $SUDO $TUNCTL -d tap$2
                else
                        usage
                        exit 1
                fi
        ;;
        *)
                usage
                exit 1
        ;;
esac

exit 0


-- 
Anton M. Serov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vb-ose-screenshot.png
Type: image/png
Size: 72001 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-virtualbox-devel/attachments/20081130/24ac0c8c/attachment-0001.png 


More information about the Pkg-virtualbox-devel mailing list