[ovs-dev] [PATCH 2/2] xenserver: Better document scriplet action in RPM spec file.

Justin Pettit jpettit at nicira.com
Wed May 4 06:23:05 UTC 2011


---
 xenserver/openvswitch-xen.spec |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/xenserver/openvswitch-xen.spec b/xenserver/openvswitch-xen.spec
index 89dfd77..31ade07 100644
--- a/xenserver/openvswitch-xen.spec
+++ b/xenserver/openvswitch-xen.spec
@@ -224,14 +224,14 @@ for s in openvswitch openvswitch-xapi-update; do
     chkconfig $s on || printf "Could not enable $s init script."
 done
 
-if [ "$1" = "1" ]; then    # $1 = 2 for upgrade
+if [ "$1" = "1" ]; then    # $1 = 1 for install
     # Configure system to use Open vSwitch
     xe-switch-network-backend vswitch
 
     printf "\nAttempts to modify networking on the server or any hosted\n"
     printf "VM will fail until after the reboot and could leave the\n"
     printf "server in a state requiring manual recovery.\n\n"
-else
+else    # $1 = 2 for upgrade
 
     mode=$(cat /etc/xensource/network.conf)
     if [ "$mode" != "vswitch" ] && [ "$mode" != "openvswitch" ]; then
@@ -251,7 +251,7 @@ fi
 depmod %{xen_version}
 
 %preun
-if [ "$1" = "0" ]; then     # $1 = 1 for upgrade
+if [ "$1" = "0" ]; then     # $1 = 0 for uninstall
     for s in openvswitch openvswitch-xapi-update; do
         chkconfig --del $s || printf "Could not remove $s init script."
     done
@@ -289,7 +289,7 @@ do
     fi
 done
 
-if [ "$1" = "0" ]; then     # $1 = 1 for upgrade
+if [ "$1" = "0" ]; then     # $1 = 0 for uninstall
     rm -f /usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.pyc \
         /usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.pyo
 
-- 
1.7.1




More information about the dev mailing list