[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] Revert "Drop debian/debian-edu-config.preinst obsolete since buster...

Holger Levsen gitlab at salsa.debian.org
Tue Oct 8 12:49:51 BST 2019



Holger Levsen pushed to branch master at Debian Edu / debian-edu-config


Commits:
ab6c6f83 by Holger Levsen at 2019-10-08T11:49:12Z
Revert "Drop debian/debian-edu-config.preinst obsolete since buster development had begun." - because it's maybe used by debian/debian-edu-config.maintscript

This reverts commit 97f4f635a809ee2ea223d0f9df7c260d17873ed3.

- - - - -


2 changed files:

- debian/changelog
- + debian/debian-edu-config.preinst


Changes:

=====================================
debian/changelog
=====================================
@@ -17,8 +17,6 @@ debian-edu-config (2.11.4) UNRELEASED; urgency=medium
   * Drop share/debian-edu-config/tools/password-fix-squeeze-r0 for the same
     reason.
   * Drop stuff commented out in 2012 in ldap-bootstrap/root.ldif.
-  * Drop debian/debian-edu-config.preinst obsolete since buster development
-    had begun.
 
  -- Wolfgang Schweer <wschweer at arcor.de>  Tue, 08 Oct 2019 23:10:38 +1300
 


=====================================
debian/debian-edu-config.preinst
=====================================
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+set -e
+
+rm_conffile() {
+    PKGNAME="$1"
+    CONFFILE="$2"
+
+    if [ -e "$CONFFILE" ]; then
+        md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
+        old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE's/.* //p\"`"
+        if [ "$md5sum" != "$old_md5sum" ]; then
+            echo "Obsolete conffile $CONFFILE has been modified by you."
+            echo "Saving as $CONFFILE.dpkg-old ..."
+            mv -f "$CONFFILE" "$CONFFILE".dpkg-old
+        else
+            echo "Removing obsolete conffile $CONFFILE ..."
+            rm -f "$CONFFILE"
+        fi
+    fi
+}
+# Prepare to move a conffile without triggering a dpkg question.  From
+# http://wiki.debian.org/DpkgConffileHandling
+prep_mv_conffile() {
+    local PKGNAME="$1"
+    local CONFFILE="$2"
+
+    [ -e "$CONFFILE" ] || return 0
+
+    local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')"
+    local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME | \
+            sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")"
+    if [ "$md5sum" = "$old_md5sum" ]; then
+        rm -f "$CONFFILE"
+    fi
+}
+
+case "$1" in
+install)
+    ;;
+upgrade)
+
+    # Just in case linking has already been done manually to now obsolete file.
+    if dpkg --compare-versions "$2" le "1.818+deb8u1" && [ -L /etc/firefox-esr/debian-edu-networked.js ] ; then
+	rm /etc/firefox-esr/debian-edu-networked.js
+    fi
+    ;;
+esac
+
+#DEBHELPER#



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/commit/ab6c6f83b40ee83ff9a4bd9fd2b55e19995d0af7

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/commit/ab6c6f83b40ee83ff9a4bd9fd2b55e19995d0af7
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20191008/e9591f3f/attachment-0001.html>


More information about the debian-edu-commits mailing list