From 6ce6d3c928f26bacca60baf716b4b99a05a45ba7 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Thu, 18 Feb 2010 16:16:56 -0800 Subject: [PATCH] xenserver: Fix VIF script to work with XenServer 5.5 --- xenserver/etc_xensource_scripts_vif | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xenserver/etc_xensource_scripts_vif b/xenserver/etc_xensource_scripts_vif index 91131598..110f03bf 100755 --- a/xenserver/etc_xensource_scripts_vif +++ b/xenserver/etc_xensource_scripts_vif @@ -164,7 +164,13 @@ remove_from_bridge() NETWORK_MODE=$(cat /etc/xensource/network.conf) ACTION=$1 -TYPE=$2 + +# Older versions of XenServer do not pass in the type as an argument +if [[ $# -lt 2 ]]; then + TYPE=vif +else + TYPE=$2 +fi case $NETWORK_MODE in bridge|vswitch) ;; -- 2.30.2