VirtualBox

Changeset 82441 in vbox for trunk/debian/preinst


Ignore:
Timestamp:
Dec 5, 2019 11:16:02 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
135289
Message:

Config: disable PCI passthrough
debian: big resync with files in src/VBox/Installer/Linux/debian, this must have been broken for years
doc: mention dropping of PCI passthrough
src/VBox/Installer/linux: adapt to handle no longer present vboxpci.ko (without completely ripping it out)

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/debian/preinst

    • Property svn:eol-style set to LF
    • Property svn:executable set to *
    • Property svn:keywords set to Author Date Id Revision
    r82440 r82441  
    11#!/bin/bash
     2# $Id$
     3## @file
     4# VirtualBox pre-install.
    25#
    3 # Copyright (C) 2006-2012 Oracle Corporation
     6
     7#
     8# Copyright (C) 2006-2019 Oracle Corporation
    49#
    510# This file is part of VirtualBox Open Source Edition (OSE), as
     
    2631  db_capb backup
    2732
    28   # check for active VMs
    29   VBOXSVC_PID=`pidof VBoxSVC 2> /dev/null || true`
    30   if [ -n "$VBOXSVC_PID" ]; then
    31     if [ -f /etc/init.d/vboxballoonctrl-service ]; then
    32       # try graceful termination; terminate the ballon control service first
    33       if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
    34         invoke-rc.d vboxballoonctrl-service stop || true
    35       else
    36         /etc/init.d/vboxballoonctrl-service stop || true
    37       fi
    38     fi
    39     if [ -f /etc/init.d/vboxweb-service ]; then
    40       # try graceful termination; terminate the webservice first
    41       if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
    42         invoke-rc.d vboxweb-service stop || true
    43       else
    44         /etc/init.d/vboxweb-service stop || true
    45       fi
    46     fi
    47     kill -USR1 $VBOXSVC_PID
    48     sleep 1
    49     if pidof VBoxSVC > /dev/null 2>&1; then
    50       db_fset virtualbox/old-running seen false || true
    51       db_input critical virtualbox/old-running || true
    52       db_go || true
    53       exit 1
    54     fi
    55   fi
    56 
    5733  # check for old installation
    5834  if [ -r /etc/vbox/vbox.cfg ]; then
     
    6743  fi
    6844
    69   # check for old vboxdrv modules
    70   if [ "$INSTALL_NO_VBOXDRV" != "1" ]; then
    71     if find /lib/modules -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then
    72       # old modules found
    73       db_get virtualbox/delete-old-modules || true
    74       if [ "$RET" = "false" ]; then
    75         cat << EOF
    76 Old vboxdrv kernel modules found in
    77 EOF
    78         find /lib/modules -name "vboxdrv\.*" 2>/dev/null|sed "s+\(.*\)+  \1+g"
    79         cat << EOF
    80 Removing of these modules denied by debconf setting
    81 EOF
    82       else
    83         db_input low virtualbox/delete-old-modules || true
    84         db_go || true
    85         db_get virtualbox/delete-old-modules || true
    86         if [ "$RET" = "true" ]; then
    87           find /lib/modules -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null
    88           find /lib/modules -name "vboxnetflt\.*" 2>/dev/null|xargs rm -f 2>/dev/null
    89           find /lib/modules -name "vboxnetadp\.*" 2>/dev/null|xargs rm -f 2>/dev/null
    90         fi
    91       fi
     45  # check for active VMs
     46  # Execute the installed package's pre-uninstaller if present.
     47  /usr/lib/virtualbox/prerm-common.sh 2>/dev/null || true
     48  # Stop services from older versions without pre-uninstaller.
     49  invoke-rc.d vboxballoonctrl-service stop 2>/dev/null || true
     50  /etc/init.d/vboxballoonctrl-service stop 2>/dev/null || true
     51  invoke-rc.d vboxautostart-service stop 2>/dev/null || true
     52  /etc/init.d/vboxautostart-service stop 2>/dev/null || true
     53  invoke-rc.d vboxweb-service stop 2>/dev/null || true
     54  /etc/init.d/vboxweb-service stop 2>/dev/null || true
     55  VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null || true`
     56  if [ -n "$VBOXSVC_PID" ]; then
     57    # ask the daemon to terminate immediately
     58    kill -USR1 $VBOXSVC_PID
     59    sleep 1
     60    if pidof VBoxSVC > /dev/null 2>&1; then
     61      db_fset virtualbox/old-running seen false || true
     62      db_input critical virtualbox/old-running || true
     63      db_go || true
     64      exit 1
    9265    fi
    9366  fi
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette