Changeset 82441 in vbox for trunk/debian/postinst
- 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/postinst
-
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/sh 2 # $Id$ 3 ## @file 4 # VirtualBox postinst 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 … … 18 23 # abort-deconfigure: (our version): error during resolving conflicts 19 24 20 #include installer-common.sh 25 ## @todo Do we really gain anything from not just executing everything 26 ## unconditionally? 21 27 22 28 LOG="/var/log/vbox-install.log" … … 49 55 fi 50 56 51 # install udev rule (disable with INSTALL_NO_UDEV=1 in52 # /etc/default/virtualbox) and /dev/vboxdrv and /dev/vboxusb/*/* device nodes53 install_device_node_setup root 0600 /usr/share/virtualbox "${usb_group}"54 55 57 # The starters need to be Suid root. They drop the privileges before starting 56 58 # the real frontend. 57 if ! dpkg-statoverride --list /usr/lib/virtualbox/VirtualBox > /dev/null 2>&1; then 58 chmod 4511 /usr/lib/virtualbox/VirtualBox 59 if test -e /usr/lib/virtualbox/VirtualBoxVM; then 60 if ! dpkg-statoverride --list /usr/lib/virtualbox/VirtualBoxVM > /dev/null 2>&1; then 61 chmod 4511 /usr/lib/virtualbox/VirtualBoxVM 62 fi 63 else 64 if ! dpkg-statoverride --list /usr/lib/virtualbox/VirtualBox > /dev/null 2>&1; then 65 chmod 4511 /usr/lib/virtualbox/VirtualBox 66 fi 59 67 fi 60 68 if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxHeadless > /dev/null 2>&1; then … … 78 86 fi 79 87 fi 80 81 # if INSTALL_NO_VBOXDRV is set to 1, remove all shipped modules82 if [ "$INSTALL_NO_VBOXDRV" = "1" ]; then83 rm -f /lib/modules/*/misc/vboxdrv.ko84 rm -f /lib/modules/*/misc/vboxnetflt.ko85 rm -f /lib/modules/*/misc/vboxnetadp.ko86 fi87 88 88 fi # $1 = "configure" 89 89 90 90 #DEBHELPER# 91 91 92 if [ "$1" = "configure" ]; then 93 # Start vboxdrv/vboxballoonctrl/vboxweb-service manually as we use our own error handling in postrm 94 if [ -x "/etc/init.d/vboxdrv" ]; then 95 update-rc.d vboxdrv defaults 20 80 >/dev/null 92 if test "${INSTALL_NO_VBOXDRV}" = 1; then 93 POSTINST_START=--nostart 94 else 95 POSTINST_START= 96 fi 96 97 97 BUILD_MODULES=0 98 REGISTER_MODULES=1 99 # Disable module compilation with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox 100 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then 101 REGISTER_MODULES=0 102 if [ "$INSTALL_NO_VBOXDRV" != "1" ]; then 103 db_get virtualbox/module-compilation-allowed 104 if [ "$RET" = "false" ]; then 105 cat << EOF 106 Unable to find a precompiled module for the current kernel 107 though module compilation denied by debconf setting. 108 EOF 109 else 110 db_input low virtualbox/module-compilation-allowed || true 111 db_go || true 112 db_get virtualbox/module-compilation-allowed 113 if [ "$RET" = "true" ]; then 114 BUILD_MODULES=1 115 fi 116 fi 117 fi 118 fi 119 120 if [ $BUILD_MODULES -eq 1 ]; then 121 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then 122 invoke-rc.d vboxdrv setup || true 123 else 124 /etc/init.d/vboxdrv setup || true 125 fi 126 else 127 # shipped modules found, register sources at DKMS anyway 128 if lsmod | grep -q "vboxdrv[^_-]"; then 129 /etc/init.d/vboxdrv stop || true 130 fi 131 if [ $REGISTER_MODULES -eq 1 ]; then 132 DKMS=`which dkms 2>/dev/null` 133 if [ -n "$DKMS" ]; then 134 $DKMS add -m vboxhost -v %VER% > /dev/null 2>&1 || true 135 fi 136 fi 137 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then 138 invoke-rc.d vboxdrv start || exit $? 139 else 140 /etc/init.d/vboxdrv start || exit $? 141 fi 142 fi 143 fi 144 if [ -x "/etc/init.d/vboxballoonctrl-service" ]; then 145 update-rc.d vboxballoonctrl-service defaults 35 65 >/dev/null 146 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then 147 invoke-rc.d vboxballoonctrl-service start || exit $? 148 else 149 /etc/init.d/vboxballoonctrl-service start || exit $? 150 fi 151 fi 152 if [ -x "/etc/init.d/vboxautostart-service" ]; then 153 update-rc.d vboxautostart-service defaults 35 65 >/dev/null 154 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then 155 invoke-rc.d vboxautostart-service start || exit $? 156 else 157 /etc/init.d/vboxautostart-service start || exit $? 158 fi 159 fi 160 if [ -x "/etc/init.d/vboxweb-service" ]; then 161 update-rc.d vboxweb-service defaults 35 65 >/dev/null 162 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then 163 invoke-rc.d vboxweb-service start || exit $? 164 else 165 /etc/init.d/vboxweb-service start || exit $? 166 fi 167 fi 168 169 fi # $1 = "configure" 98 # Install and start the new service scripts. 99 /usr/lib/virtualbox/prerm-common.sh || true 100 /usr/lib/virtualbox/postinst-common.sh ${POSTINST_START} > /dev/null || true 170 101 171 102 exit 0 -
Property svn:eol-style
set to
Note:
See TracChangeset
for help on using the changeset viewer.