[Pkg-sssd-devel] [Git][sssd-team/sssd][master] libnss-sss.postinst: Migrate to use 'case' like the other postinsts.

Timo Aaltonen (@tjaalton) gitlab at salsa.debian.org
Thu Apr 27 15:25:17 BST 2023



Timo Aaltonen pushed to branch master at Debian SSSD packaging / sssd


Commits:
0bc80bdb by Timo Aaltonen at 2023-04-27T17:24:28+03:00
libnss-sss.postinst: Migrate to use 'case' like the other postinsts.

- - - - -


2 changed files:

- debian/changelog
- debian/libnss-sss.postinst


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+sssd (2.8.2-5) UNRELEASED; urgency=medium
+
+  * libnss-sss.postinst: Migrate to use 'case' like the other postinsts.
+
+ -- Timo Aaltonen <tjaalton at debian.org>  Thu, 27 Apr 2023 17:24:24 +0300
+
 sssd (2.8.2-4) unstable; urgency=medium
 
   [ Sam Morris ]


=====================================
debian/libnss-sss.postinst
=====================================
@@ -1,18 +1,27 @@
 #!/bin/sh
 set -e
 
-action="$1"
+case "$1" in
+    configure)
+        if [ -n "$2" ]; then
+            # upgrade
+            version="$2"
 
-if [ configure = "$action" ]; then
-    if [ -n "$2" ]; then
-        # upgrade
-        version="$2"
-
-        # fix automount typo
-	if dpkg --compare-versions $version lt "2.2.3-3"; then
-            sed -i 's/automounter/automount/' "${DPKG_ROOT}/etc/nsswitch.conf"
+            # fix automount typo
+            if dpkg --compare-versions $version lt "2.2.3-3"; then
+                sed -i 's/automounter/automount/' "${DPKG_ROOT}/etc/nsswitch.conf"
+            fi
         fi
-    fi
-fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
 
 #DEBHELPER#



View it on GitLab: https://salsa.debian.org/sssd-team/sssd/-/commit/0bc80bdb887aa850b98f2b356cecf5fcc07a87d4

-- 
View it on GitLab: https://salsa.debian.org/sssd-team/sssd/-/commit/0bc80bdb887aa850b98f2b356cecf5fcc07a87d4
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/pkg-sssd-devel/attachments/20230427/e47a4acd/attachment-0001.htm>


More information about the Pkg-sssd-devel mailing list