diff options
author | Heinz Wiesinger <pprkut@liwjatan.at> | 2010-07-20 09:25:26 -0500 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2010-07-21 01:43:05 -0500 |
commit | cbe484c6dbe99ea11f531dfeb5057d924b284b02 (patch) | |
tree | 30462f11fce454eb402469baf6e061efe2e9b63d /system/virtualbox-ose-addons/doinst.sh | |
parent | 19fcad79c22355e6284dda2f98539f687884a1fa (diff) | |
download | slackbuilds-cbe484c6dbe99ea11f531dfeb5057d924b284b02.tar.gz |
system/virtualbox-ose-addons: Updated for version 3.2.6.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/virtualbox-ose-addons/doinst.sh')
-rw-r--r-- | system/virtualbox-ose-addons/doinst.sh | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/system/virtualbox-ose-addons/doinst.sh b/system/virtualbox-ose-addons/doinst.sh index 9b1e606f30..58fdc15a9a 100644 --- a/system/virtualbox-ose-addons/doinst.sh +++ b/system/virtualbox-ose-addons/doinst.sh @@ -11,15 +11,19 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } -# Prepare the new configuration files -for file in etc/rc.d/rc.vboxadd.new etc/rc.d/rc.vboxadd-service.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.vboxadd.new +preserve_perms etc/rc.d/rc.vboxadd-service.new # remove existing fdi cache to recognize newly installed fdi files # and restart hal to regenerate the cache |