Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:zhubr
virtualbox52
vbox-suse02-vboxadd-scrpt.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File vbox-suse02-vboxadd-scrpt.diff of Package virtualbox52
--- a/src/VBox/Additions/linux/installer/vboxadd.sh.orig +++ b/src/VBox/Additions/linux/installer/vboxadd.sh @@ -24,13 +24,14 @@ # ### BEGIN INIT INFO # Provides: vboxadd -# Required-Start: -# Required-Stop: -# Default-Start: 2 3 4 5 +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Default-Start: 2 5 # Default-Stop: 0 1 6 # X-Start-Before: display-manager # X-Service-Type: oneshot # Description: VirtualBox Linux Additions kernel modules +# Short-Description: VirtualBox Linux Additions kernel modules ### END INIT INFO ## @todo This file duplicates a lot of script with vboxdrv.sh. When making @@ -195,12 +196,6 @@ fail "Cannot create device $dev with major $maj and minor $min" } fi - chown $owner:$group $dev 2>/dev/null || { - rm -f $dev 2>/dev/null - rm -f $userdev 2>/dev/null - rmmod vboxguest 2>/dev/null - fail "Cannot change owner $owner:$group for device $dev" - } if [ ! -c $userdev ]; then maj=10 @@ -211,12 +206,6 @@ rmmod vboxguest 2>/dev/null fail "Cannot create device $userdev with major $maj and minor $min" } - chown $owner:$group $userdev 2>/dev/null || { - rm -f $dev 2>/dev/null - rm -f $userdev 2>/dev/null - rmmod vboxguest 2>/dev/null - fail "Cannot change owner $owner:$group for device $userdev" - } fi fi } @@ -224,6 +213,13 @@ start() { begin "Starting." + + if [ -x /usr/bin/systemd-detect-virt ]; then + if [ "x$(systemd-detect-virt)" != "xoracle" ]; then + fail "Not running on a virtualbox guest" + fi + fi + if test -z "${INSTALL_NO_MODULE_BUILDS}"; then setup --quick test -d /sys && @@ -484,49 +480,8 @@ # setup_script setup() { - export BUILD_TYPE - export USERNAME - - test x"$1" != x--quick || QUICKSETUP=true - test -n "$QUICKSETUP" || cleanup - MODULE_SRC="$INSTALL_DIR/src/vboxguest-$INSTALL_VER" - BUILDINTMP="$MODULE_SRC/build_in_tmp" - # chcon is needed on old Fedora/Redhat systems. No one remembers which. - test ! -e /etc/selinux/config || - chcon -t bin_t "$BUILDINTMP" 2>/dev/null - - if test -z "$INSTALL_NO_MODULE_BUILDS"; then - if test -z "$QUICKSETUP"; then - info "Building the VirtualBox Guest Additions kernel modules. This may take a while." - info "To build modules for other installed kernels, run" - info " /sbin/rcvboxadd quicksetup <version>" - for setupi in /lib/modules/*; do - KERN_VER="${setupi##*/}" - # For a full setup, mark kernels we do not want to build. - touch "$SKIPFILE_BASE"-"$KERN_VER" - done - fi - # That is, we mark all but the requested kernel. - rm -f "$SKIPFILE_BASE"-"$TARGET_VER" - test -d /lib/modules/"$TARGET_VER"/build || test -n "$QUICKSETUP" || - info "Kernel headers not found for target kernel $TARGET_VER. \ -Please install them and execute - /sbin/rcvboxadd setup" - for setupi in /lib/modules/*; do - KERN_VER="${setupi##*/}" - setup_modules "$KERN_VER" - done - depmod - fi - create_vbox_user - create_udev_rule - test -n "${INSTALL_NO_MODULE_BUILDS}" || create_module_rebuild_script - test -z "$QUICKSETUP" || return 0 - shared_folder_setup - if running_vboxguest || running_vboxadd; then - info "Running kernel modules will not be replaced until the system is restarted" - fi - return 0 + begin "Recompiling VirtualBox kernel module(s) is not supposed in this package." + succ_msg } # cleanup_script
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor