📄 qemu-ifup
字号:
#!/bin/sh#. /etc/rc.d/init.d/functions#ulimit -c unlimitedecho 'config qemu network with xen bridge for ' $*bridge=$2## Old style bridge setup with netloop, used to have a bridge name# of xenbrX, enslaving pethX and vif0.X, and then configuring# eth0.## New style bridge setup does not use netloop, so the bridge name# is ethX and the physical device is enslaved pethX## So if...## - User asks for xenbrX# - AND xenbrX doesn't exist# - AND there is a ethX device which is a bridge## ..then we translate xenbrX to ethX## This lets old config files work without modification#if [ ! -e "/sys/class/net/$bridge" ] && [ -z "${bridge##xenbr*}" ]then if [ -e "/sys/class/net/eth${bridge#xenbr}/bridge" ] then bridge="eth${bridge#xenbr}" fifiifconfig $1 0.0.0.0 upbrctl addif $bridge $1 || true
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -