#!/sbin/runscript # Copyright 2004 arize105 # Distributed under the terms of the GNU General Public License v2 # $Header: /etc/init.d/umlstart, v 1.1 2004/04/04 22:05:00 arize105 # http://user-mode-linux.sourceforge.net/UserModeLinux-HOWTO-6.html#ss6.7 depend() { need net } start() { # umlsquanto tunctl -b -u 10000 -bt tap0 ifconfig tap0 192.168.0.254 up route add -host 192.168.0.10 dev tap0 bash -c 'echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp' arp -Ds 192.168.0.10 eth0 pub # umlarize105 tunctl -b -u 10001 -bt tap1 ifconfig tap1 192.168.0.253 up route add -host 192.168.0.11 dev tap1 bash -c 'echo 1 > /proc/sys/net/ipv4/conf/tap1/proxy_arp' arp -Ds 192.168.0.11 eth0 pub # umlxvaderx tunctl -b -u 10002 -bt tap2 ifconfig tap2 192.168.0.252 up route add -host 192.168.0.12 dev tap2 bash -c 'echo 1 > /proc/sys/net/ipv4/conf/tap2/proxy_arp' arp -Ds 192.168.0.12 eth0 pub } stop() { # umlxvaderx arp -i eth0 -d 192.168.0.10 pub # bash -c 'echo 0 > /proc/sys/net/ipv4/conf/tap0/proxy_arp' route del -host 192.168.0.10 dev tap0 ifconfig tap2 192.168.0.252 down tunctl -b -d tap2 # umlarize105 arp -i eth1 -d 192.168.0.11 pub # bash -c 'echo 0 > /proc/sys/net/ipv4/conf/tap1/proxy_arp' route del -host 192.168.0.11 dev tap1 ifconfig tap1 192.168.0.253 down tunctl -b -d tap1 # umlsquanto arp -i eth2 -d 192.168.0.12 pub # bash -c 'echo 0 > /proc/sys/net/ipv4/conf/tap2/proxy_arp' route del -host 192.168.0.12 dev tap2 ifconfig tap0 192.168.0.254 down tunctl -b -d tap0 }