X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=xenserver%2Fopenvswitch-xen.spec;h=d2433f986f5d9560a0cb4ce171ab4ca727f916c9;hb=4959755dc8512f6a0b19ce13138d6d001629904d;hp=5e1bc359ff4a4968129f255e0a95d598af6d8365;hpb=1981102e61e7b03c36e214390dfa535ef2dfc460;p=openvswitch diff --git a/xenserver/openvswitch-xen.spec b/xenserver/openvswitch-xen.spec index 5e1bc359..d2433f98 100644 --- a/xenserver/openvswitch-xen.spec +++ b/xenserver/openvswitch-xen.spec @@ -86,8 +86,8 @@ install -m 644 \ xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py \ $RPM_BUILD_ROOT/usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.py -install -d -m 755 $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/net/openvswitch -find datapath/linux-2.6 -name *.ko -exec install -m 755 \{\} $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/net/openvswitch \; +install -d -m 755 $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/extra/openvswitch +find datapath/linux-2.6 -name *.ko -exec install -m 755 \{\} $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/extra/openvswitch \; # Get rid of stuff we don't want to make RPM happy. rm \ @@ -103,7 +103,6 @@ rm \ $RPM_BUILD_ROOT/usr/share/man/man8/ovs-kill.8 \ $RPM_BUILD_ROOT/usr/share/man/man8/ovs-openflowd.8 \ $RPM_BUILD_ROOT/usr/share/man/man8/ovs-pki.8 -rm -f $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/net/openvswitch/veth_mod.ko install -d -m 755 $RPM_BUILD_ROOT/var/lib/openvswitch @@ -115,6 +114,7 @@ if [ ! -f /etc/xensource-inventory ]; then printf "XenSource inventory not present in /etc/xensource-inventory" exit 1 fi +. /etc/xensource-inventory if [ "$1" = "1" ]; then if md5sum -c --status < /etc/xensource/network.conf + fi +fi + + if test ! -e /var/xapi/network.dbcache; then if test "$1" = 1; then printf "Creating xapi database cache... " @@ -280,6 +302,11 @@ fi %postun if [ "$1" = "0" ]; then # $1 = 1 for upgrade + . /etc/xensource-inventory + if test "$PRODUCT_VERSION" = "5.5.0"; then + XSS=/opt/xensource/libexec/xapi-startup-script + rm -f $XSS + fi rm -f /usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.pyc \ /usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.pyo @@ -294,6 +321,9 @@ if [ "$1" = "0" ]; then # $1 = 1 for upgrade # Restore original XenServer scripts for f in \ /opt/xensource/libexec/interface-reconfigure \ + /opt/xensource/libexec/InterfaceReconfigure.py \ + /opt/xensource/libexec/InterfaceReconfigureBridge.py \ + /opt/xensource/libexec/InterfaceReconfigureVswitch.py \ /etc/xensource/scripts/vif \ /usr/sbin/xen-bugtool \ /usr/sbin/brctl @@ -315,8 +345,13 @@ if [ "$1" = "0" ]; then # $1 = 1 for upgrade rm -f /etc/openvswitch/vswitchd.cacert rm -f /var/xapi/network.dbcache - # Configure system to use bridge - echo bridge > /etc/xensource/network.conf + if test "$PRODUCT_VERSION" != "5.5.0"; then + # Configure system to use bridge + echo bridge > /etc/xensource/network.conf + else + # Get rid of network.conf entirely, to make the system pristine. + rm -f /etc/xensource/network.conf + fi printf "\nYou MUST reboot the server now to complete the change to\n" printf "standard Xen networking. Attempts to modify networking on the\n" @@ -332,11 +367,8 @@ fi /etc/xapi.d/plugins/openvswitch-cfg-update /etc/logrotate.d/openvswitch /etc/profile.d/openvswitch.sh -/lib/modules/%{xen_version}/kernel/net/openvswitch/openvswitch_mod.ko -/lib/modules/%{xen_version}/kernel/net/openvswitch/brcompat_mod.ko -%if %(echo '%{xen_version}'|awk -F"." '{if ($3>=18) print 1; else print 0;}') -/lib/modules/%{xen_version}/kernel/net/openvswitch/ip_gre_mod.ko -%endif +/lib/modules/%{xen_version}/kernel/extra/openvswitch/openvswitch_mod.ko +/lib/modules/%{xen_version}/kernel/extra/openvswitch/brcompat_mod.ko /usr/share/openvswitch/scripts/refresh-network-uuids /usr/share/openvswitch/scripts/interface-reconfigure /usr/share/openvswitch/scripts/InterfaceReconfigure.py