[Pkg-xfce-commits] [Git][xfce-extras-team/lightdm][debian/master] 3 commits: postrm: Use `which` & add `error()`

Yves-Alexis Perez (@corsac) gitlab at salsa.debian.org
Fri Jan 13 09:23:00 GMT 2023



Yves-Alexis Perez pushed to branch debian/master at Xfce external packages / lightdm


Commits:
cff58616 by Akbarkhon Variskhanov at 2022-11-02T19:25:58+05:00
postrm: Use `which` & add `error()`

- - - - -
a147c5b0 by Akbarkhon Variskhanov at 2022-11-02T19:28:13+05:00
Delete debian/lightdm.lintian-overrides

- - - - -
ed215118 by Yves-Alexis Perez at 2023-01-13T09:22:54+00:00
Merge branch 'postrm' into 'debian/master'

Changes around postrm

See merge request xfce-extras-team/lightdm!11
- - - - -


2 changed files:

- − debian/lightdm.lintian-overrides
- debian/lightdm.postrm


Changes:

=====================================
debian/lightdm.lintian-overrides deleted
=====================================
@@ -1,3 +0,0 @@
-# we need the path since we check file existence
-lightdm: command-with-path-in-maintainer-script postrm:22 /usr/sbin/deluser
-lightdm: command-with-path-in-maintainer-script postrm:27 /usr/sbin/delgroup


=====================================
debian/lightdm.postrm
=====================================
@@ -18,14 +18,16 @@ if [ "$1" = "purge" ] ; then
         if [ -d /var/log/lightdm ]; then
                 rm -r /var/log/lightdm
         fi
+        error() { echo >&2 "Could not remove lightdm $1.
+Please make sure lightdm is not running before attempting to purge lightdm"; }
         if getent passwd lightdm >/dev/null; then
-                if [ -x /usr/sbin/deluser ]; then
-                        deluser --system lightdm ||echo " Could not remove lightdm user, please make sure lightdm is not running before attempting to purge lightdm" 
+                if which deluser >/dev/null; then
+                        deluser --system lightdm || error user
                 fi
         fi
         if getent group lightdm >/dev/null; then
-                if [ -x /usr/sbin/delgroup ]; then
-                        delgroup --system lightdm || echo "Could not remove lightdm group, please make sure lightdm is not running before attempting to purge lightdm"
+                if which delgroup >/dev/null; then
+                        delgroup --system lightdm || error group
                 fi
         fi
 fi



View it on GitLab: https://salsa.debian.org/xfce-extras-team/lightdm/-/compare/59e2c18688110c9420c289dd437b6a2ca46212d5...ed21511857209d573f4f935cd71135ecc7c35ed3

-- 
View it on GitLab: https://salsa.debian.org/xfce-extras-team/lightdm/-/compare/59e2c18688110c9420c289dd437b6a2ca46212d5...ed21511857209d573f4f935cd71135ecc7c35ed3
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-xfce-commits/attachments/20230113/9ca6e340/attachment-0001.htm>


More information about the Pkg-xfce-commits mailing list