Currently, on installation or upgrade the openvswitch-switch deb package will in some circumstances modify a pre-existing /etc/default/openvswitch-switch configuration file.
This does not play well with modeling and configuration management tools and may lead to unnecessary restarts of the openvswitch-switch service after the initial restart done as part of the package upgrade. As restarting the openvswitch-switch affects the datapath this is something we should try to avoid. I also believe the current behaviour to be in conflict with best practices set out in the config files section of the [Debian Policy](https://www.debian.org/doc/debian-policy/#s-config-files). This commit addresses this by removing the part of the postinst script that attempts to append missing documentation parts of the template and leaves the installed defaults file alone when it exists. Signed-off-by: Frode Nordahl <[email protected]> Reported-at: https://github.com/openvswitch/ovs-issues/issues/137 --- diff --git a/debian/changelog b/debian/changelog index d2b244fca..f1a0e0c77 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ openvswitch (2.8.90-1) unstable; urgency=medium - - Nothing yet! Try NEWS... + [ Open vSwitch team ] + * Do not modify pre-existing /etc/default/openvswitch-switch -- Open vSwitch team <[email protected]> Fri, 04 Aug 2017 15:00:00 -0700 diff --git a/debian/openvswitch-switch.postinst b/debian/openvswitch-switch.postinst index 3f9b0553f..f8abd40e2 100755 --- a/debian/openvswitch-switch.postinst +++ b/debian/openvswitch-switch.postinst @@ -24,14 +24,6 @@ case "$1" in TEMPLATE=/usr/share/openvswitch/switch/default.template if ! test -e $DEFAULT; then cp $TEMPLATE $DEFAULT - else - for var in $(awk -F'[ :]' '/^# [_A-Z0-9]+:/{print $2}' $TEMPLATE) - do - if ! grep $var $DEFAULT >/dev/null 2>&1; then - echo >> $DEFAULT - sed -n "/$var:/,/$var=/p" $TEMPLATE >> $DEFAULT - fi - done fi # Certain versions of upstream Ubuntu's openvswitch packages (which # are forks) may install upstart files which are incompatible _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
