diff options
author | Menno Duursma <druiloor@zonnet.nl> | 2010-10-19 17:16:52 +0100 |
---|---|---|
committer | Michiel van Wessem <michiel@slackbuilds.org> | 2010-10-19 17:16:52 +0100 |
commit | 31444f01c3a08fe385d86afa5de85622d2089ac9 (patch) | |
tree | 30dbcfeee3979c9f2ccfa2e262b14ef757ceb7d8 /network/heimdal/doinst.sh | |
parent | 1f03a0e8f069db34508633d2df61701eba96368e (diff) | |
download | slackbuilds-31444f01c3a08fe385d86afa5de85622d2089ac9.tar.gz |
network/heimdal: Fixed permissions issues.
Signed-off-by: Michiel van Wessem <michiel@slackbuilds.org>
Diffstat (limited to 'network/heimdal/doinst.sh')
-rw-r--r-- | network/heimdal/doinst.sh | 39 |
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 - |