From 9a3d4f1ed0d7f76f8e59da46280a5adf43773815 Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Thu, 25 Nov 2010 02:09:03 -0600 Subject: system/virtualbox-ose: Updated for version 3.2.10. Signed-off-by: Robby Workman --- system/virtualbox-ose/doinst.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'system/virtualbox-ose/doinst.sh') 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 -- cgit v1.2.3