From 25db8873f76d347b6d42104ef9ca45ac6667b884 Mon Sep 17 00:00:00 2001 From: Michel Decima Date: Tue, 2 Nov 2021 18:03:22 +0100 Subject: [PATCH] chore: use common prefix for dconf/db/gdm.d files --- debian/preinst | 5 +++++ etc/dconf/db/gdm.d/{02-logo => 01-logo} | 0 etc/dconf/db/gdm.d/{03-smartcard => 01-smartcard} | 0 usr/share/orange-yourdev-login/login-password | 2 +- usr/share/orange-yourdev-login/login-pki | 2 +- 5 files changed, 7 insertions(+), 2 deletions(-) rename etc/dconf/db/gdm.d/{02-logo => 01-logo} (100%) rename etc/dconf/db/gdm.d/{03-smartcard => 01-smartcard} (100%) diff --git a/debian/preinst b/debian/preinst index 4d9aef4..4554297 100644 --- a/debian/preinst +++ b/debian/preinst @@ -5,6 +5,11 @@ case "$1" in install) ;; upgrade) + # in version > 0.3.3, prefix is 01- everywhere + if dpkg --compare-versions "$2" le 0.3.3 ; then + rm -f /etc/dconf/db/gdm.d/02-logo + rm -f /etc/dconf/db/gdm.d/03-smartcard + fi ;; abort-upgrade) ;; diff --git a/etc/dconf/db/gdm.d/02-logo b/etc/dconf/db/gdm.d/01-logo similarity index 100% rename from etc/dconf/db/gdm.d/02-logo rename to etc/dconf/db/gdm.d/01-logo diff --git a/etc/dconf/db/gdm.d/03-smartcard b/etc/dconf/db/gdm.d/01-smartcard similarity index 100% rename from etc/dconf/db/gdm.d/03-smartcard rename to etc/dconf/db/gdm.d/01-smartcard diff --git a/usr/share/orange-yourdev-login/login-password b/usr/share/orange-yourdev-login/login-password index d16d17d..03f97d2 100755 --- a/usr/share/orange-yourdev-login/login-password +++ b/usr/share/orange-yourdev-login/login-password @@ -12,7 +12,7 @@ if [ -e /etc/pam.d/gdm-smartcard-sssd-or-password ] ; then fi sed -Ei 's/(enable-smartcard-authentication)=.*/\1=false/' \ - /etc/dconf/db/gdm.d/03-smartcard + /etc/dconf/db/gdm.d/01-smartcard dconf update systemctl enable sssd.service sssd-pam.socket diff --git a/usr/share/orange-yourdev-login/login-pki b/usr/share/orange-yourdev-login/login-pki index 062b517..791f3aa 100755 --- a/usr/share/orange-yourdev-login/login-pki +++ b/usr/share/orange-yourdev-login/login-pki @@ -11,7 +11,7 @@ update-alternatives --set gdm-smartcard \ || { echo >&2 "Cannot switch to PKI login (GDM too old?)" ; exit 1 ; } sed -Ei 's/(enable-smartcard-authentication)=.*/\1=true/' \ - /etc/dconf/db/gdm.d/03-smartcard + /etc/dconf/db/gdm.d/01-smartcard dconf update cat << EOF