Changeset 58241 in vbox
- Timestamp:
- Oct 14, 2015 1:46:43 PM (9 years ago)
- Location:
- trunk/src/VBox/Installer/linux
- Files:
-
- 7 edited
-
debian/postinst (modified) (2 diffs)
-
debian/preinst.in (modified) (1 diff)
-
debian/templates (modified) (1 diff)
-
install.sh (modified) (1 diff)
-
prerm-common.sh (modified) (1 diff)
-
rpm/VirtualBox.tmpl.spec (modified) (2 diffs)
-
vboxdrv.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/debian/postinst
r58186 r58241 17 17 # abort-remove: (our version): removing this package failed 18 18 # abort-deconfigure: (our version): error during resolving conflicts 19 20 ## @todo Do we really gain anything from not just executing everything 21 ## unconditionally? 19 22 20 23 LOG="/var/log/vbox-install.log" … … 78 81 if test "${INSTALL_NO_VBOXDRV}" = 1; then 79 82 POSTINST_START=--nostart 80 # if INSTALL_NO_VBOXDRV is set to 1, remove all shipped modules81 if [ "$1" = "configure" ]; then82 rm -f /lib/modules/*/misc/vboxdrv.ko83 rm -f /lib/modules/*/misc/vboxnetflt.ko84 rm -f /lib/modules/*/misc/vboxnetadp.ko85 rm -f /lib/modules/*/misc/vboxpci.ko86 fi87 83 else 88 84 POSTINST_START= 89 # Disable module compilation with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox90 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then91 if [ "$1" = "configure" ]; then92 db_get virtualbox/module-compilation-allowed93 if [ "$RET" = "false" ]; then94 cat << EOF95 Unable to find a precompiled module for the current kernel96 though module compilation denied by debconf setting.97 EOF98 POSTINST_START=--nostart99 else100 db_input low virtualbox/module-compilation-allowed || true101 db_go || true102 db_get virtualbox/module-compilation-allowed103 if [ "$RET" = "false" ]; then104 POSTINST_START=--nostart105 fi106 fi107 fi # $1 = "configure"108 fi109 85 fi 110 86 -
trunk/src/VBox/Installer/linux/debian/preinst.in
r58194 r58241 61 61 fi 62 62 63 # check for old vboxdrv modules64 if [ "$INSTALL_NO_VBOXDRV" != "1" ]; then65 if find /lib/modules -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then66 # old modules found67 db_get virtualbox/delete-old-modules || true68 if [ "$RET" = "false" ]; then69 cat << EOF70 Old vboxdrv kernel modules found in71 EOF72 find /lib/modules -name "vboxdrv\.*" 2>/dev/null|sed "s+\(.*\)+ \1+g"73 cat << EOF74 Removing of these modules denied by debconf setting75 EOF76 else77 db_input low virtualbox/delete-old-modules || true78 db_go || true79 db_get virtualbox/delete-old-modules || true80 if [ "$RET" = "true" ]; then81 for i in /lib/modules/*; do82 if test -e "${i}/misc/vboxdrv.ko"; then83 rm -f "${i}/misc/vboxdrv.ko" "${i}/misc/vboxnetadp.ko" \84 "${i}/misc/vboxnetflt.ko" "${i}/misc/vboxpci.ko"85 # Remove the kernel version folder if it was empty except for us.86 test "`echo ${i}/misc/* ${i}/misc/.?* ${i}/* ${i}/.?*`" = \87 "${i}/misc/* ${i}/misc/.. ${i}/misc ${i}/.." &&88 rmdir "${i}/misc" "${i}" # We used to leave empty folders.89 fi90 done91 fi92 fi93 fi94 fi95 96 63 fi # "$1" = "install" -o "$1" = "upgrade" 97 64 -
trunk/src/VBox/Installer/linux/debian/templates
r58090 r58241 32 32 mit Root-Rechten aus. 33 33 34 Template: virtualbox/module-compilation-allowed35 Type: boolean36 Default: true37 Description: Should the vboxdrv kernel module be compiled now?38 Unable to find a precompiled module for the current kernel!39 .40 Without a suitable kernel module you will not be able to start any VMs. It is41 strongly recommended that you compile a kernel module now. This requires42 kernel headers and the tools to build kernel modules (gcc, make, binutils, ...).43 However if you know that a suitable kernel module already exists at another44 location, you might want to override the default by setting45 KDIR=<full_path_to_vboxdrv_module> in /etc/default/virtualbox. You can also46 build the module later by executing47 48 /sbin/vboxconfig49 50 as root.51 Description-de.UTF-8: Soll das Kernmodul jetzt compiliert werden?52 Es konnte kein Kernmodul für den aktuellen Linux-Kern gefunden werden!53 .54 Ohne ein passendes Kernmodul können Sie keine VM starten. Daher sollten Sie55 jetzt ein Kernmodul compilieren. Dazu werden die Kern-Header und die Programme56 zum Bauen eines Kernmoduls (gcc, make, binutils, ...) benötigt. Falls Sie57 bereits ein passendes Kernmodul in ein anderes Verzeichnis installiert haben,58 können Sie den Verzeichnisnamen durch Hinzufügen von KDIR=<voller_Pfad_zu_vboxdrv>59 in der Datei /etc/default/virtualbox angeben. Sie können das Kernmodul auch60 später compilieren, indem Sie61 62 /sbin/vboxconfig63 64 mit Root-Rechten ausführen.65 66 Template: virtualbox/delete-old-modules67 Type: boolean68 Default: true69 Description: Delete old vboxdrv kernel modules?70 Old vboxdrv kernel modules found. You should remove these modules as they71 might interfere with this version of VirtualBox. You can force re-compilation72 of the module later by executing73 74 /sbin/vboxconfig75 76 as root.77 Description-de.UTF-8: Alte Kernmodule löschen?78 Es wurden alte vboxdrv-Kernmodule gefunden. Diese sollten gelöscht werden, da sie79 eventuell nicht mit dieser Version von VirtualBox zusammen arbeiten. Das Compilieren80 des Kernmoduls können Sie später durch81 82 /sbin/vboxconfig83 84 erzwingen.85 86 34 Template: virtualbox/old-installation-found 87 35 Type: note -
trunk/src/VBox/Installer/linux/install.sh
r58193 r58241 364 364 # script set-up. 365 365 if test "${BUILD_MODULE}" = "true"; then 366 for i in /lib/modules/*; do367 if test -e "${i}/misc/vboxdrv.ko"; then368 rm -f "${i}/misc/vboxdrv.ko" "${i}/misc/vboxnetadp.ko" \369 "${i}/misc/vboxnetflt.ko" "${i}/misc/vboxpci.ko"370 # Remove the kernel version folder if it was empty except for us.371 test "`echo ${i}/misc/* ${i}/misc/.?* ${i}/* ${i}/.?*`" = \372 "${i}/misc/* ${i}/misc/.. ${i}/misc ${i}/.." &&373 rmdir "${i}/misc" "${i}" # We used to leave empty folders.374 fi375 done376 366 START_SERVICES= 377 367 else 378 368 START_SERVICES="--nostart" 379 369 fi 370 "${INSTALLATION_DIR}/prerm-common.sh" >> "${LOG}" 380 371 "${INSTALLATION_DIR}/postinst-common.sh" ${START_SERVICES} >> "${LOG}" 381 372 -
trunk/src/VBox/Installer/linux/prerm-common.sh
r58214 r58241 55 55 delrunlevel vboxdrv 56 56 remove_init_script vboxdrv 57 # And do final clean-up 58 "${MY_PATH}/vboxdrv.sh" cleanup 57 59 # Stop host networking and uninstall runlevel script (obsolete) 58 60 stop_init_script vboxnet 2>/dev/null -
trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
r58186 r58241 236 236 fi 237 237 238 # XXX remove old modules from previous versions (disable with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox)239 if [ "$INSTALL_NO_VBOXDRV" != "1" ]; then240 find /lib/modules -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2> /dev/null || true241 find /lib/modules -name "vboxnetflt\.*" 2>/dev/null|xargs rm -f 2> /dev/null || true242 find /lib/modules -name "vboxnetadp\.*" 2>/dev/null|xargs rm -f 2> /dev/null || true243 find /lib/modules -name "vboxpci\.*" 2>/dev/null|xargs rm -f 2> /dev/null || true244 fi245 246 238 247 239 %post … … 287 279 if test "${INSTALL_NO_VBOXDRV}" = 1; then 288 280 POSTINST_START=--nostart 289 if lsmod | grep -q "vboxdrv[^_-]"; then290 /usr/lib/virtualbox/vboxdrv.sh stop || true291 fi292 # if INSTALL_NO_VBOXDRV is set to 1, remove all shipped modules293 rm -f /lib/modules/*/misc/vboxdrv.ko294 rm -f /lib/modules/*/misc/vboxnetflt.ko295 rm -f /lib/modules/*/misc/vboxnetadp.ko296 rm -f /lib/modules/*/misc/vboxpci.ko297 281 else 298 282 POSTINST_START= 299 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then300 # compile problem301 cat << EOF302 No precompiled module for this kernel found -- trying to build one. If this303 fails, check the messages logged to $LOG during module compilation.304 305 EOF306 fi307 283 fi 308 284 # Install and start the new service scripts. -
trunk/src/VBox/Installer/linux/vboxdrv.sh
r58186 r58241 376 376 } 377 377 378 cleanup() 379 { 380 for i in /lib/modules/*; do 381 if test -e "${i}/misc/vboxdrv.ko"; then 382 rm -f "${i}/misc/vboxdrv.ko" "${i}/misc/vboxnetadp.ko" \ 383 "${i}/misc/vboxnetflt.ko" "${i}/misc/vboxpci.ko" 384 # Remove the kernel version folder if it was empty except for us. 385 test "`echo ${i}/misc/* ${i}/misc/.?* ${i}/* ${i}/.?*`" \ 386 = "${i}/misc/* ${i}/misc/.. ${i}/misc ${i}/.." && 387 rmdir "${i}/misc" "${i}" # We used to leave empty folders. 388 fi 389 done 390 } 391 378 392 # setup_script 379 393 setup() 380 394 { 381 395 begin_msg "Building VirtualBox kernel modules" console 382 if find /lib/modules/`uname -r` -name "vboxpci\.*" 2>/dev/null|grep -q vboxpci; then 383 begin_msg "Removing old VirtualBox pci kernel module" 384 find /lib/modules/`uname -r` -name "vboxpci\.*" 2>/dev/null|xargs rm -f 2>/dev/null 385 succ_msg 386 fi 387 if find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|grep -q vboxnetadp; then 388 begin_msg "Removing old VirtualBox netadp kernel module" 389 find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|xargs rm -f 2>/dev/null 390 succ_msg 391 fi 392 if find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|grep -q vboxnetflt; then 393 begin_msg "Removing old VirtualBox netflt kernel module" 394 find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|xargs rm -f 2>/dev/null 395 succ_msg 396 fi 397 if find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then 398 begin_msg "Removing old VirtualBox kernel module" 399 find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null 400 succ_msg 401 fi 402 begin_msg "Recompiling VirtualBox kernel modules" 396 cleanup 403 397 if ! $BUILDINTMP \ 404 398 --save-module-symvers /tmp/vboxdrv-Module.symvers \ … … 475 469 stop && start 476 470 ;; 471 setup) 472 stop && setup 473 ;; 474 cleanup) 475 stop && cleanup 476 ;; 477 477 force-reload) 478 478 stop
Note:
See TracChangeset
for help on using the changeset viewer.

