diff --git a/vbox-vboxadd-init-script.diff b/vbox-vboxadd-init-script.diff index d8506a9..3812740 100644 --- a/vbox-vboxadd-init-script.diff +++ b/vbox-vboxadd-init-script.diff @@ -1,10 +1,6 @@ -Index: src/VBox/Additions/linux/installer/vboxadd.sh -=================================================================== --- src/VBox/Additions/linux/installer/vboxadd.sh.orig +++ src/VBox/Additions/linux/installer/vboxadd.sh -@@ -19,15 +19,16 @@ - # chkconfig: 357 30 70 - # description: VirtualBox Linux Additions kernel modules +@@ -21,11 +21,12 @@ # ### BEGIN INIT INFO # Provides: vboxadd @@ -20,11 +16,7 @@ Index: src/VBox/Additions/linux/installer/vboxadd.sh ### END INIT INFO PATH=$PATH:/bin:/sbin:/usr/sbin - PACKAGE=VBoxGuestAdditions - LOG="/var/log/vboxadd-install.log" -@@ -248,32 +249,20 @@ do_vboxguest_non_udev() - mknod -m 0664 $dev c $maj $min || { - rmmod vboxguest 2>/dev/null +@@ -255,12 +256,6 @@ do_vboxguest_non_udev() fail "Cannot create device $dev with major $maj and minor $min" } fi @@ -37,10 +29,7 @@ Index: src/VBox/Additions/linux/installer/vboxadd.sh if [ ! -c $userdev ]; then maj=10 - min=`sed -n 's;\([0-9]\+\) vboxuser;\1;p' /proc/misc` - if [ ! -z "$min" ]; then - mknod -m 0666 $userdev c $maj $min || { - rm -f $dev 2>/dev/null +@@ -271,12 +266,6 @@ do_vboxguest_non_udev() rmmod vboxguest 2>/dev/null fail "Cannot create device $userdev with major $maj and minor $min" } @@ -53,11 +42,21 @@ Index: src/VBox/Additions/linux/installer/vboxadd.sh fi fi } - +@@ -284,6 +273,13 @@ do_vboxguest_non_udev() start() -@@ -478,36 +467,12 @@ extra_setup() - } - + { + begin "Starting the VirtualBox Guest Additions "; ++ ++ if [ -x /usr/bin/systemd-detect-virt ]; then ++ if [ "x$(systemd-detect-virt)" != "xoracle" ]; then ++ fail "Not running on a virtualbox guest" ++ fi ++ fi ++ + uname -r | grep -q '^2\.6' 2>/dev/null && + ps -A -o comm | grep -q '/*udevd$' 2>/dev/null || + no_udev=1 +@@ -491,32 +487,8 @@ extra_setup() # setup_script setup() { @@ -92,5 +91,3 @@ Index: src/VBox/Additions/linux/installer/vboxadd.sh } # cleanup_script - cleanup() - { diff --git a/virtualbox.changes b/virtualbox.changes index c89063c..b3ead67 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 1 22:07:32 UTC 2013 - crrodriguez@opensuse.org + +- vboxadd init script should not do anything if not running + in a virtualbox guest. + ------------------------------------------------------------------- Mon Jan 21 10:32:45 UTC 2013 - sndirsch@suse.com