xenserver: Print better error messages when "xe" fails in RPM scripts.
authorBen Pfaff <blp@nicira.com>
Thu, 4 Jun 2009 22:32:46 +0000 (15:32 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 4 Jun 2009 22:32:46 +0000 (15:32 -0700)
xenserver/vswitch-xen.spec

index b2e5ec18c221c5ce7383cedcc6db836f511ad0e0..58e35dec95e6b8cc23f5bb8e78dece0d6d8b8933 100644 (file)
@@ -165,7 +165,8 @@ fi
 source /etc/xensource-inventory
 
 xe host-param-set \
-    "other-config:vSwitchVersion=%{version}" uuid="$INSTALLATION_UUID"
+    "other-config:vSwitchVersion=%{version}" uuid="$INSTALLATION_UUID" ||
+    echo "Could not set vSwitchVersion config parameter"
 
 # Ensure ovs-vswitchd.conf exists
 touch /etc/ovs-vswitchd.conf
@@ -262,7 +263,8 @@ if [ "$1" = "0" ]; then     # $1 = 1 for upgrade
         source /etc/xensource-inventory
         xe host-param-remove \
             param-name=other-config param-key=vSwitchVersion \
-            uuid="$INSTALLATION_UUID"
+            uuid="$INSTALLATION_UUID" ||
+            echo "Could not clear vSwitchVersion config parameter."
     fi
 
     printf "\nYou MUST reboot the server now to complete the change to\n"