aboutsummaryrefslogtreecommitdiff
path: root/system/virtualbox-ose/doinst.sh
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@liwjatan.at>2010-11-25 02:09:03 -0600
committerHeinz Wiesinger <pprkut@slackbuilds.org>2010-11-29 12:45:55 +0100
commit9a3d4f1ed0d7f76f8e59da46280a5adf43773815 (patch)
tree356905cabc7fd20a2269a2925b5f974c2815a5bd /system/virtualbox-ose/doinst.sh
parentd612e843b22acd5c602f35d061271a89864168d9 (diff)
system/virtualbox-ose: Updated for version 3.2.10.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/virtualbox-ose/doinst.sh')
-rw-r--r--system/virtualbox-ose/doinst.sh20
1 files changed, 12 insertions, 8 deletions
diff --git a/system/virtualbox-ose/doinst.sh b/system/virtualbox-ose/doinst.sh
index 64d9e36d68d52..33be91fa1458b 100644
--- a/system/virtualbox-ose/doinst.sh
+++ b/system/virtualbox-ose/doinst.sh
@@ -11,6 +11,17 @@ 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
+ fi
+ config $NEW
+}
+
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database usr/share/applications >/dev/null 2>&1
fi
@@ -18,12 +29,5 @@ fi
# Prepare the new configuration files
config etc/vbox/vbox.cfg.new
config etc/default/virtualbox.new
-for file in etc/rc.d/rc.vboxdrv.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 $file
-done
+preserve_perms etc/rc.d/rc.vboxdrv.new