Browse Source

Don't migrate legacy config if it wasn't modified. Closes: #910214

Christoph Biedl 3 years ago
parent
commit
42bed11024
1 changed files with 2 additions and 1 deletions
  1. 2 1
      debian/softflowd.preinst

+ 2 - 1
debian/softflowd.preinst

@@ -12,7 +12,8 @@ upgrade)
     if \
         dpkg --compare-versions "$2" lt 0.9.9-4~ &&
         [ -f "$LEGACY_CONF" ] &&
-        [ ! -f "$DEFAULT_CONF" ]
+        [ ! -f "$DEFAULT_CONF" ] &&
+        [ $(md5sum "$LEGACY_CONF" | awk '{print $1}') != '617dbe97c274b4491b22b85b28f3ccf0' ]
     then
         # create /etc/softflowd/default.conf from /etc/default/softflowd
         # lower-case key names