X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=xenserver%2Fopenvswitch-xen.spec;h=de9b4439df2e5534be516c9c60fb027141ccf072;hb=0b8b6f71d5621a726a3bf5aa1bbee27ed1f4a8fe;hp=9a533a8385cec56216e3c707c3ff78ce48fa137e;hpb=34edeccfd8d4273844d12c85fe38ec47002c47cd;p=openvswitch diff --git a/xenserver/openvswitch-xen.spec b/xenserver/openvswitch-xen.spec index 9a533a83..de9b4439 100644 --- a/xenserver/openvswitch-xen.spec +++ b/xenserver/openvswitch-xen.spec @@ -73,8 +73,8 @@ install -m 644 xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py \ $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/InterfaceReconfigureVswitch.py install -m 755 xenserver/etc_xensource_scripts_vif \ $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/vif -install -m 755 xenserver/usr_share_openvswitch_scripts_ovs-external-ids \ - $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/ovs-external-ids +install -m 755 xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync \ + $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/ovs-xapi-sync install -m 755 xenserver/usr_sbin_xen-bugtool \ $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/xen-bugtool install -m 755 xenserver/usr_share_openvswitch_scripts_sysconfig.template \ @@ -109,23 +109,26 @@ install -d -m 755 $RPM_BUILD_ROOT/var/lib/openvswitch rm -rf $RPM_BUILD_ROOT %post -if test ! -e /var/xapi/network.dbcache; then - if test "$1" = 1; then - printf "Creating xapi database cache... " - else - printf "warning: Open vSwitch is being re-installed or upgraded,\n" - printf " but the xapi database cache is missing.\n" - printf "Re-creating xapi database cache... " - fi +# Do not run the first block if we are in the XenServer installer +if runlevel >/dev/null 2>&1; then + if test ! -e /var/xapi/network.dbcache; then + if test "$1" = 1; then + printf "Creating xapi database cache... " + else + printf "warning: Open vSwitch is being re-installed or upgraded,\n" + printf " but the xapi database cache is missing.\n" + printf "Re-creating xapi database cache... " + fi - if /usr/share/openvswitch/scripts/interface-reconfigure rewrite; then - printf "done.\n" - else - printf "FAILED\n" - printf "Open vSwitch can only be installed on a XenServer that\n" - printf "has connectivity to xapi on the pool master. Please\n" - printf "fix connectivity to the pool master, then try again.\n" - exit 1 + if /usr/share/openvswitch/scripts/interface-reconfigure rewrite; then + printf "done.\n" + else + printf "FAILED\n" + printf "Open vSwitch can only be installed on a XenServer that\n" + printf "has connectivity to xapi on the pool master. Please\n" + printf "fix connectivity to the pool master, then try again.\n" + exit 1 + fi fi fi @@ -305,7 +308,7 @@ fi /usr/share/openvswitch/python/ovs/timeval.py /usr/share/openvswitch/python/ovs/util.py /usr/share/openvswitch/python/uuid.py -/usr/share/openvswitch/scripts/ovs-external-ids +/usr/share/openvswitch/scripts/ovs-xapi-sync /usr/share/openvswitch/scripts/interface-reconfigure /usr/share/openvswitch/scripts/InterfaceReconfigure.py /usr/share/openvswitch/scripts/InterfaceReconfigureBridge.py