X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=xenserver%2Fvswitch-xen.spec;h=ba78a4db084e5940355bb59a890f0bd91d55cfce;hb=96aa6a2a6dd417486a64fd5a51aee0917a707d87;hp=a0899edd18f1508c3d07d5ff782cbb61b9d860c5;hpb=c3e3d2a1e72f2fec8580e7974f809846788bc8ff;p=openvswitch diff --git a/xenserver/vswitch-xen.spec b/xenserver/vswitch-xen.spec index a0899edd..ba78a4db 100644 --- a/xenserver/vswitch-xen.spec +++ b/xenserver/vswitch-xen.spec @@ -67,6 +67,8 @@ install -d -m 755 $RPM_BUILD_ROOT/etc/xapi.d/plugins install -m 755 xenserver/etc_xapi.d_plugins_vswitch-cfg-update \ $RPM_BUILD_ROOT/etc/xapi.d/plugins/vswitch-cfg-update install -d -m 755 $RPM_BUILD_ROOT/usr/share/vswitch/scripts +install -m 644 vswitchd/vswitch-idl.ovsschema \ + $RPM_BUILD_ROOT/usr/share/vswitch/vswitch-idl.ovsschema install -m 755 xenserver/opt_xensource_libexec_interface-reconfigure \ $RPM_BUILD_ROOT/usr/share/vswitch/scripts/interface-reconfigure install -m 755 xenserver/etc_xensource_scripts_vif \ @@ -186,8 +188,16 @@ net.ipv4.conf.all.arp_filter = 1 EOF fi -# Ensure ovs-vswitchd.conf exists -touch /etc/ovs-vswitchd.conf +if test ! -e /etc/ovs-vswitchd.conf.db; then + # Create ovs-vswitchd config database + ovsdb-tool create /etc/ovs-vswitchd.conf.db \ + /usr/share/vswitch/vswitch-idl.ovsschema + + # Create initial table in config database + ovsdb-tool transact /etc/ovs-vswitchd.conf.db \ + '[{"op": "insert", "table": "Open_vSwitch", "row": {}}]' \ + > /dev/null +fi # Create default or update existing /etc/sysconfig/vswitch. SYSCONFIG=/etc/sysconfig/vswitch @@ -284,7 +294,7 @@ if [ "$1" = "0" ]; then # $1 = 1 for upgrade done # Remove all configuration files - rm -f /etc/ovs-vswitchd.conf + rm -f /etc/ovs-vswitchd.conf.db rm -f /etc/sysconfig/vswitch rm -f /etc/ovs-vswitchd.cacert rm -f /var/lib/openvswitch/dbcache @@ -323,6 +333,7 @@ fi # include them. /usr/share/vswitch/scripts/XSFeatureVSwitch.pyc /usr/share/vswitch/scripts/XSFeatureVSwitch.pyo +/usr/share/vswitch/vswitch-idl.ovsschema /usr/sbin/ovs-brcompatd /usr/sbin/ovs-vswitchd /usr/sbin/ovsdb-server