Date: Thursday, May 28, 2015 @ 23:22:00 Author: demize Revision: 134285
nss-pam-ldapd: statically assign UID/gid Modified: nss-pam-ldapd/trunk/PKGBUILD nss-pam-ldapd/trunk/nss-pam-ldapd.install -----------------------+ PKGBUILD | 2 +- nss-pam-ldapd.install | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2015-05-28 17:43:46 UTC (rev 134284) +++ PKGBUILD 2015-05-28 21:22:00 UTC (rev 134285) @@ -4,7 +4,7 @@ pkgname=nss-pam-ldapd pkgver=0.9.5 -pkgrel=2 +pkgrel=3 pkgdesc='LDAP module for NSS and PAM' url="http://arthurdejong.org/nss-pam-ldapd/" Modified: nss-pam-ldapd.install =================================================================== --- nss-pam-ldapd.install 2015-05-28 17:43:46 UTC (rev 134284) +++ nss-pam-ldapd.install 2015-05-28 21:22:00 UTC (rev 134285) @@ -1,11 +1,23 @@ post_install() { - getent passwd nslcd >> /dev/null || useradd -r -M -U -d /var/run/nslcd -s /bin/false nslcd + getent group nslcd >> /dev/null || groupadd --gid 146 nslcd + getent passwd nslcd >> /dev/null || useradd --gid 146 -M -d /var/run/nslcd -s /bin/false nslcd } post_upgrade() { - getent passwd nslcd >> /dev/null || useradd -r -M -U -d /var/run/nslcd -s /bin/false nslcd + post_install + + local ver + local old_ver="$2" + local upgrades=(0.9.5-3) + + for ver in "${upgrades[@]}"; do + if [[ $(vercmp "$ver" "$old_ver") -eq 1 ]]; then + "_${ver//-/_}_changes" + fi + done } -pre_remove() { - userdel nslcd >/dev/null 2>&1 || true +_0.9.5_3_changes() { + printf '%s\n' ':: nss-pam-ldapd will from 0.9.5-4 and on use the statically allocated UID/GID 146.' + printf '%s\n' ' Please switch to the new UID and GID at your convenience.' }
