aboutsummaryrefslogtreecommitdiff
path: root/network/heimdal/doinst.sh
diff options
context:
space:
mode:
authorMenno Duursma <druiloor@zonnet.nl>2010-10-19 23:06:49 +0100
committerMichiel van Wessem <michiel@slackbuilds.org>2010-10-19 23:06:49 +0100
commit3b9c9c536c4819249ae803e967f923c9422a95a5 (patch)
treeaf8b5c08359f586118948615cb51f71772c68cbb /network/heimdal/doinst.sh
parent03341b25e63cdccdf933facbc688c5fa8a3eb73a (diff)
network/heimdal: Updated for version 1.4.
Signed-off-by: Michiel van Wessem <michiel@slackbuilds.org>
Diffstat (limited to 'network/heimdal/doinst.sh')
-rw-r--r--network/heimdal/doinst.sh39
1 files changed, 15 insertions, 24 deletions
diff --git a/network/heimdal/doinst.sh b/network/heimdal/doinst.sh
index 8920e52c2546c..804678c3b8cfa 100644
--- a/network/heimdal/doinst.sh
+++ b/network/heimdal/doinst.sh
@@ -1,8 +1,3 @@
-# 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)"
@@ -16,27 +11,23 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-# 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
+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 $file
-done
+ config $NEW
+}
+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
+