summaryrefslogtreecommitdiff
path: root/system/virtualbox-addons/rc.vboxadd.diff
diff options
context:
space:
mode:
Diffstat (limited to 'system/virtualbox-addons/rc.vboxadd.diff')
-rw-r--r--system/virtualbox-addons/rc.vboxadd.diff48
1 files changed, 33 insertions, 15 deletions
diff --git a/system/virtualbox-addons/rc.vboxadd.diff b/system/virtualbox-addons/rc.vboxadd.diff
index 0820ad86fb..ca6cafd5be 100644
--- a/system/virtualbox-addons/rc.vboxadd.diff
+++ b/system/virtualbox-addons/rc.vboxadd.diff
@@ -1,20 +1,25 @@
---- vboxadd.sh 2012-04-26 18:56:57.000000000 +0200
-+++ vboxadd.sh 2012-05-06 11:55:44.161897154 +0200
-@@ -28,10 +28,6 @@
- # Description: VirtualBox Linux Additions kernel modules
- ### END INIT INFO
-
--. /var/lib/VBoxGuestAdditions/config
--export BUILD_TYPE
--export USERNAME
--
- PATH=$PATH:/bin:/sbin:/usr/sbin
- PACKAGE=VBoxGuestAdditions
- BUILDVBOXGUEST=`/bin/ls /usr/src/vboxguest*/vboxguest/build_in_tmp 2>/dev/null|cut -d' ' -f1`
-@@ -500,31 +496,13 @@
+--- vboxadd.sh.orig 2012-03-13 15:52:25.000000000 +0100
++++ vboxadd.sh 2012-09-18 22:09:48.886085813 +0200
+@@ -480,60 +480,13 @@
# setup_script
setup()
{
+- if test -r $config; then
+- . $config
+- else
+- fail "Configuration file $config not found"
+- fi
+- test -n "$INSTALL_DIR" -a -n "$INSTALL_VER" ||
+- fail "Configuration file $config not complete"
+- export BUILD_TYPE
+- export USERNAME
+-
+- MODULE_SRC="$INSTALL_DIR/src/vboxguest-$INSTALL_VER"
+- BUILDINTMP="$MODULE_SRC/build_in_tmp"
+- DODKMS="$MODULE_SRC/do_dkms"
+- chcon -t bin_t "$BUILDINTMP" > /dev/null 2>&1
+- chcon -t bin_t "$DODKMS" > /dev/null 2>&1
+-
- setup_modules
- mod_succ="$?"
- extra_setup
@@ -31,12 +36,25 @@
# cleanup_script
cleanup()
{
+- if test -r $config; then
+- . $config
+- test -n "$INSTALL_DIR" -a -n "$INSTALL_VER" ||
+- fail "Configuration file $config not complete"
+- DODKMS="$INSTALL_DIR/src/vboxguest-$INSTALL_VER/do_dkms"
+- elif test -x ./do_dkms; then # Executing as part of the installer...
+- DODKMS=./do_dkms
+- else
+- fail "Configuration file $config not found"
+- fi
+-
- # Delete old versions of VBox modules.
- cleanup_modules
- depmod
-
- # Remove old module sources
-- rm -rf /usr/src/vboxadd-* /usr/src/vboxguest-* /usr/src/vboxvfs-* /usr/src/vboxsf-* /usr/src/vboxvideo-*
+- for i in $OLDMODULES; do
+- rm -rf /usr/src/$i-*
+- done
-
- # Remove other files
- rm /sbin/mount.vboxsf 2>/dev/null