Changeset 82441 in vbox for trunk/debian/preinst
- Timestamp:
- Dec 5, 2019 11:16:02 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 135289
- 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 1 1 #!/bin/bash 2 # $Id$ 3 ## @file 4 # VirtualBox pre-install. 2 5 # 3 # Copyright (C) 2006-2012 Oracle Corporation 6 7 # 8 # Copyright (C) 2006-2019 Oracle Corporation 4 9 # 5 10 # This file is part of VirtualBox Open Source Edition (OSE), as … … 26 31 db_capb backup 27 32 28 # check for active VMs29 VBOXSVC_PID=`pidof VBoxSVC 2> /dev/null || true`30 if [ -n "$VBOXSVC_PID" ]; then31 if [ -f /etc/init.d/vboxballoonctrl-service ]; then32 # try graceful termination; terminate the ballon control service first33 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then34 invoke-rc.d vboxballoonctrl-service stop || true35 else36 /etc/init.d/vboxballoonctrl-service stop || true37 fi38 fi39 if [ -f /etc/init.d/vboxweb-service ]; then40 # try graceful termination; terminate the webservice first41 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then42 invoke-rc.d vboxweb-service stop || true43 else44 /etc/init.d/vboxweb-service stop || true45 fi46 fi47 kill -USR1 $VBOXSVC_PID48 sleep 149 if pidof VBoxSVC > /dev/null 2>&1; then50 db_fset virtualbox/old-running seen false || true51 db_input critical virtualbox/old-running || true52 db_go || true53 exit 154 fi55 fi56 57 33 # check for old installation 58 34 if [ -r /etc/vbox/vbox.cfg ]; then … … 67 43 fi 68 44 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 92 65 fi 93 66 fi -
Property svn:eol-style
set to
Note:
See TracChangeset
for help on using the changeset viewer.