summaryrefslogtreecommitdiff
path: root/system/nss-pam-ldapd/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'system/nss-pam-ldapd/doinst.sh')
-rw-r--r--system/nss-pam-ldapd/doinst.sh14
1 files changed, 13 insertions, 1 deletions
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