Changeset 72196 in vbox
- Timestamp:
- May 11, 2018 7:06:17 PM (6 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
-
Additions/linux/installer/vboxadd.sh (modified) (7 diffs)
-
Installer/linux/routines.sh (modified) (2 diffs)
-
Installer/linux/vboxdrv.sh (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/installer/vboxadd.sh
r69564 r72196 127 127 setup_log 128 128 echo "${1}" >> "${LOG}" 129 } 130 131 module_build_log() 132 { 133 setup_log 134 echo "${1}" | egrep -v \ 135 "^test -e include/generated/autoconf.h|^echo >&2|^/bin/false)$" \ 136 >> "${LOG}" 129 137 } 130 138 … … 254 262 255 263 # Put the X.Org driver in place. This is harmless if it is not needed. 256 "${INSTALL_DIR}/init/vboxadd-x11" setup 2>> "${LOG}" 264 myerr=`"${INSTALL_DIR}/init/vboxadd-x11" setup 2>&1` 265 test -z "${myerr}" || log "${myerr}" 257 266 # Install the guest OpenGL drivers. For now we don't support 258 267 # multi-architecture installations … … 308 317 cleanup_modules() 309 318 { 310 log "Removing existing VirtualBox kernel modules."311 319 for i in ${OLDMODULES}; do 312 320 # We no longer support DKMS, remove any leftovers. … … 329 337 # This does not work for 2.4 series kernels. How sad. 330 338 test -n "${QUICKSETUP}" && test -f "${MODULE_DIR}/vboxguest.ko" && return 0 331 info "Building the VirtualBox Guest Additions kernel modules." 332 333 # We are allowed to do ">> $LOG" after we have called "log()" once. 339 info "Building the VirtualBox Guest Additions kernel modules. This may take a while." 340 334 341 log "Building the main Guest Additions module." 335 if ! $BUILDINTMP \342 if ! myerr=`$BUILDINTMP \ 336 343 --save-module-symvers /tmp/vboxguest-Module.symvers \ 337 344 --module-source $MODULE_SRC/vboxguest \ 338 --no-print-directory install >> $LOG 2>&1; then345 --no-print-directory install 2>&1`; then 339 346 # If check_module_dependencies.sh fails it prints a message itself. 347 log "Error building the module:" 348 module_build_log "$myerr" 340 349 "${INSTALL_DIR}"/other/check_module_dependencies.sh 2>&1 && 341 350 info "Look at $LOG to find out what went wrong" 342 351 return 0 343 352 fi 344 log "Building the shared folder support module "345 if ! $BUILDINTMP \353 log "Building the shared folder support module." 354 if ! myerr=`$BUILDINTMP \ 346 355 --use-module-symvers /tmp/vboxguest-Module.symvers \ 347 356 --module-source $MODULE_SRC/vboxsf \ 348 --no-print-directory install >> $LOG 2>&1; then 357 --no-print-directory install 2>&1`; then 358 log "Error building the module:" 359 module_build_log "$myerr" 349 360 info "Look at $LOG to find out what went wrong" 350 361 return 0 351 362 fi 352 log "Building the graphics driver module "353 if ! $BUILDINTMP \363 log "Building the graphics driver module." 364 if ! myerr=`$BUILDINTMP \ 354 365 --use-module-symvers /tmp/vboxguest-Module.symvers \ 355 366 --module-source $MODULE_SRC/vboxvideo \ 356 --no-print-directory install >> $LOG 2>&1; then 367 --no-print-directory install 2>&1`; then 368 log "Error building the module:" 369 module_build_log "$myerr" 357 370 info "Look at $LOG to find out what went wrong" 358 371 fi … … 367 380 create_vbox_user() 368 381 { 369 log "Creating user for the Guest Additions."370 382 # This is the LSB version of useradd and should work on recent 371 383 # distributions … … 380 392 # Create udev description file 381 393 if [ -d /etc/udev/rules.d ]; then 382 log "Creating udev rule for the Guest Additions kernel module."383 394 udev_call="" 384 395 udev_app=`which udevadm 2> /dev/null` … … 484 495 485 496 # Clean-up X11-related bits 486 "${INSTALL_DIR}/init/vboxadd-x11" cleanup 2>> "${LOG}"497 "${INSTALL_DIR}/init/vboxadd-x11" cleanup 487 498 488 499 # Remove other files -
trunk/src/VBox/Installer/linux/routines.sh
r70930 r72196 45 45 } 46 46 47 ## Writes text to standard error 47 ## Writes text to standard error, as standard output is masked. 48 48 # 49 49 # Syntax: info text … … 51 51 { 52 52 echo 1>&2 "$1" 53 } 54 55 ## Copies standard input to standard error, as standard output is masked. 56 # 57 # Syntax: info text 58 catinfo() 59 { 60 cat 1>&2 53 61 } 54 62 -
trunk/src/VBox/Installer/linux/vboxdrv.sh
r69500 r72196 35 35 PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH 36 36 DEVICE=/dev/vboxdrv 37 LOG="/var/log/vbox-install.log"38 37 MODPROBE=/sbin/modprobe 39 38 SCRIPTNAME=vboxdrv.sh … … 46 45 MODPROBE="$MODPROBE --allow-unsupported-modules" 47 46 fi 47 48 setup_log() 49 { 50 test -n "${LOG}" && return 0 51 # Rotate log files 52 LOG="/var/log/vbox-setup.log" 53 mv "${LOG}.3" "${LOG}.4" 2>/dev/null 54 mv "${LOG}.2" "${LOG}.3" 2>/dev/null 55 mv "${LOG}.1" "${LOG}.2" 2>/dev/null 56 mv "${LOG}" "${LOG}.1" 2>/dev/null 57 } 48 58 49 59 [ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg … … 110 120 { 111 121 lsmod | grep -q "$1[^_-]" 122 } 123 124 log() 125 { 126 setup_log 127 echo "${1}" >> "${LOG}" 128 } 129 130 module_build_log() 131 { 132 setup_log 133 echo "${1}" | egrep -v \ 134 "^test -e include/generated/autoconf.h|^echo >&2|^/bin/false)$" \ 135 >> "${LOG}" 112 136 } 113 137 … … 398 422 { 399 423 begin_msg "Building VirtualBox kernel modules" console 400 if ! $BUILDINTMP \ 424 log "Building the main VirtualBox module." 425 if ! myerr=`$BUILDINTMP \ 401 426 --save-module-symvers /tmp/vboxdrv-Module.symvers \ 402 427 --module-source "$MODULE_SRC/vboxdrv" \ 403 --no-print-directory install >> $LOG 2>&1; then428 --no-print-directory install 2>&1`; then 404 429 "${INSTALL_DIR}/check_module_dependencies.sh" || exit 1 430 log "Error building the module:" 431 module_build_log "$myerr" 405 432 failure "Look at $LOG to find out what went wrong" 406 433 fi 407 if ! $BUILDINTMP \ 434 log "Building the net filter module." 435 if ! myerr=`$BUILDINTMP \ 408 436 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 409 437 --module-source "$MODULE_SRC/vboxnetflt" \ 410 --no-print-directory install >> $LOG 2>&1; then 438 --no-print-directory install 2>&1`; then 439 log "Error building the module:" 440 module_build_log "$myerr" 411 441 failure "Look at $LOG to find out what went wrong" 412 442 fi 413 if ! $BUILDINTMP \ 443 log "Building the net adaptor module." 444 if ! myerr=`$BUILDINTMP \ 414 445 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 415 446 --module-source "$MODULE_SRC/vboxnetadp" \ 416 --no-print-directory install >> $LOG 2>&1; then 447 --no-print-directory install 2>&1`; then 448 log "Error building the module:" 449 module_build_log "$myerr" 417 450 failure "Look at $LOG to find out what went wrong" 418 451 fi 419 if ! $BUILDINTMP \ 452 log "Building the PCI pass-through module." 453 if ! myerr=`$BUILDINTMP \ 420 454 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 421 455 --module-source "$MODULE_SRC/vboxpci" \ 422 --no-print-directory install >> $LOG 2>&1; then 456 --no-print-directory install 2>&1`; then 457 log "Error building the module:" 458 module_build_log "$myerr" 423 459 failure "Look at $LOG to find out what went wrong" 424 460 fi … … 475 511 ;; 476 512 setup) 513 test -n "${2}" && export KERN_VER="${2}" 477 514 # Create udev rule and USB device nodes. 478 515 ## todo Wouldn't it make more sense to install the rule to /lib/udev? This
Note:
See TracChangeset
for help on using the changeset viewer.

