fi
done
fi
-
- if /etc/init.d/openvswitch-switch status >/dev/null 2>&1; then
- running=true
- /etc/init.d/openvswitch-switch stop
- else
- running=false
- fi
-
- if test ! -e /etc/openvswitch-switch/conf; then
- # Create configuration database.
- ovsdb-tool -vANY:console:emer \
- create /etc/openvswitch-switch/conf \
- /usr/share/openvswitch/vswitch-idl.ovsschema
-
- # Initialize configuration database.
- ovsdb-tool -vANY:console:emer \
- transact /etc/openvswitch-switch/conf \
- '[{"op": "insert", "table": "Open_vSwitch", "row": {}}]' \
- > /dev/null
- fi
-
- if $running; then
- /etc/init.d/openvswitch-switch start
- fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
esac
-#DEBHELPER#
+# Do not fail package installation just because the kernel module
+# is not available.
+OVS_MISSING_KMOD_OK=yes
+export OVS_MISSING_KMOD_OK
-exit 0
+# Save and restore openflow flows during a package upgrade.
+OVS_RESTART_SAVE_FLOWS=yes
+export OVS_RESTART_SAVE_FLOWS
+#DEBHELPER#
+exit 0