VirtualBox

Ticket #14474: 0001-start-VBoxClient-inside-virtualbox-guest-only.patch

File 0001-start-VBoxClient-inside-virtualbox-guest-only.patch, 1.4 KB (added by Christian Hesse, 9 years ago)

start VBoxClient inside virtualbox guest only

  • src/VBox/Additions/x11/Installer/98vboxadd-xclient

    From 000d4b0e6b14cc7ebcdaa691d2ae8070e0e51c69 Mon Sep 17 00:00:00 2001
    From: Christian Hesse <mail@eworm.de>
    Date: Wed, 19 Aug 2015 12:36:12 +0200
    Subject: [PATCH 1/1] start VBoxClient inside virtualbox guest only
    
    The guest additions can be installed on systems that do not necessarily
    start as a virtualbox guest, for example (but not limited to) on live
    media (bootable CD/USB, PXE, ...).
    Check whether or not we can detect virtualization, exit gracefully if we
    detect non virtualbox system.
    
    Signed-off-by: Christian Hesse <mail@eworm.de>
    ---
     src/VBox/Additions/x11/Installer/98vboxadd-xclient | 8 ++++++++
     1 file changed, 8 insertions(+)
    
    diff --git a/src/VBox/Additions/x11/Installer/98vboxadd-xclient b/src/VBox/Additions/x11/Installer/98vboxadd-xclient
    index f0d4236..481d589 100755
    a b  
    1515# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
    1616#
    1717
     18# Check if systemd-detect-virt (from systemd) is available.
     19if type systemd-detect-virt >/dev/null 2>/dev/null; then
     20    # Check if this is a virtualbox guest. Exit if it is not.
     21    if ! systemd-detect-virt | grep -q 'oracle'; then
     22        exit 0
     23    fi
     24fi
     25
    1826# Sanity check: if non-writeable PID-files are present in the user home
    1927# directory VBoxClient will fail to start.
    2028for i in $HOME/.vboxclient-*.pid; do

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy