summaryrefslogtreecommitdiffstats
path: root/network/heimdal/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'network/heimdal/doinst.sh')
-rw-r--r--network/heimdal/doinst.sh39
1 files changed, 24 insertions, 15 deletions
diff --git a/network/heimdal/doinst.sh b/network/heimdal/doinst.sh
index 804678c3b8..8920e52c25 100644
--- a/network/heimdal/doinst.sh
+++ b/network/heimdal/doinst.sh
@@ -1,3 +1,8 @@
+# Add heimdal libs to the library search path
+if ! grep -q '^/usr/heimdal/lib$' etc/ld.so.conf ; then
+ echo "/usr/heimdal/lib" >> etc/ld.so.conf
+fi
+
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
@@ -11,23 +16,27 @@ config() {
# 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
+# Keep same perms on rc.heimdal:
+if [ -e etc/rc.d/rc.heimdal ]; then
+ cp -a etc/rc.d/rc.heimdal etc/rc.d/rc.heimdal.new.incoming
+ cat etc/rc.d/rc.heimdal.new > etc/rc.d/rc.heimdal.new.incoming
+ mv etc/rc.d/rc.heimdal.new.incoming etc/rc.d/rc.heimdal.new
+fi
+
+# Prepare the new configuration files
+for file in \
+ etc/rc.d/rc.heimdal.new \
+ etc/profile.d/heimdal.sh.new \
+ etc/profile.d/heimdal.csh.new ;
+ do
+ if [ -e $(dirname $file)/$(basename $file .new) -a -x $(dirname $file)/$(basename $file .new) ]; then
+ chmod 0755 $file
+ else
+ chmod 0644 $file
fi
- config $NEW
-}
+ config $file
+done
-preserve_perms etc/rc.d/rc.heimdal.new
config etc/krb5.conf-sample.new
config var/heimdal/kdc.conf-sample.new
-# Add heimdal libs to the library search path
-if ! grep -q '^/usr/heimdal/lib$' etc/ld.so.conf ; then
- echo "/usr/heimdal/lib" >> etc/ld.so.conf
-fi
-