From 58e49dda851dc33d215b7a822493bd43f789b82f Mon Sep 17 00:00:00 2001 From: Christopher Walker Date: Tue, 23 Apr 2013 20:48:16 -0400 Subject: system/nss-pam-ldapd: Updated for version 0.8.12. Signed-off-by: dsomero --- system/nss-pam-ldapd/doinst.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'system/nss-pam-ldapd/doinst.sh') diff --git a/system/nss-pam-ldapd/doinst.sh b/system/nss-pam-ldapd/doinst.sh index 8dc7649986..d483abce26 100644 --- a/system/nss-pam-ldapd/doinst.sh +++ b/system/nss-pam-ldapd/doinst.sh @@ -10,5 +10,17 @@ config() { fi # Otherwise, we leave the .new copy for the admin to consider... } + +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + config etc/nslcd.conf.new -config etc/rc.d/rc.nss-pam-ldapd.new +preserve_perms etc/rc.d/rc.nss-pam-ldapd.new -- cgit v1.2.3