diff options
Diffstat (limited to 'network/heimdal/doinst.sh')
-rw-r--r-- | network/heimdal/doinst.sh | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/network/heimdal/doinst.sh b/network/heimdal/doinst.sh index 8920e52c25..804678c3b8 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 + |