Index: xen-3.1-testing/tools/examples/xen-network-common.sh =================================================================== --- xen-3.1-testing.orig/tools/examples/xen-network-common.sh +++ xen-3.1-testing/tools/examples/xen-network-common.sh @@ -16,53 +16,21 @@ # -# On SuSE it is necessary to run a command before transfering addresses and -# routes from the physical interface to the virtual. This command creates a -# variable $HWD_CONFIG_0 that specifies the appropriate configuration for -# ifup. - -# Gentoo doesn't have ifup/ifdown, so we define appropriate alternatives. - -# Other platforms just use ifup / ifdown directly. +preiftransfer() +{ + # Ensure the interface has an IP to transfer + /sbin/ifrenew $1 -o rc || true +} -## -# preiftransfer -# -# @param $1 The current name for the physical device, which is also the name -# that the virtual device will take once the physical device has -# been renamed. - -if [ -e /etc/SuSE-release ] -then - preiftransfer() - { - eval `/sbin/getcfg -d /etc/sysconfig/network/ -f ifcfg- -- $1` - } - ifup() - { - /sbin/ifup ${HWD_CONFIG_0} $1 - } -elif ! which ifup >/dev/null 2>/dev/null -then - preiftransfer() - { - true - } - ifup() - { - false - } - ifdown() - { - false - } -else - preiftransfer() - { - true - } -fi +ifup() +{ + /sbin/ifup $1 -o rc || true +} +ifdown() +{ + /sbin/ifdown $1 -o rc +} first_file() {