1
0
forked from pool/virtualbox

Accepting request 157037 from home:elvigia:branches:Virtualization

** for 12.3 **

- vboxadd init script should not do anything if not running
  in a virtualbox guest.

OBS-URL: https://build.opensuse.org/request/show/157037
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=114
This commit is contained in:
Michal Seben 2013-03-03 10:58:46 +00:00 committed by Git OBS Bridge
parent c22919ec19
commit 9d4991ea75
2 changed files with 23 additions and 20 deletions

View File

@ -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()
{

View File

@ -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