VirtualBox

Changeset 68705 in vbox


Ignore:
Timestamp:
Sep 8, 2017 3:06:08 PM (7 years ago)
Author:
vboxsync
Message:

Additions/linux/installer: clean up log file handling.
bugref:3809: Linux installer maintenance

Only rotate the Additions set-up log file if we actually have something to
log, and clean up a reference to a no-longer-existing log file.

Location:
trunk/src/VBox/Additions/linux/installer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/installer/vboxadd-x11.sh

    r68684 r68705  
    3030
    3131PATH=$PATH:/bin:/sbin:/usr/sbin
    32 LOG="/var/log/vboxadd-install-x11.log"
    3332CONFIG_DIR="/var/lib/VBoxGuestAdditions"
    3433CONFIG="${CONFIG_DIR}/config"
     
    454453    # And set up VBoxClient to start when the X session does
    455454    install_x11_startup_app "${lib_dir}/98vboxadd-xclient" "${lib_dir}/vboxclient.desktop" VBoxClient VBoxClient-all ||
    456         fail "See the log file $LOG for more information."
     455        fail "Failed to set up VBoxClient to start automatically."
    457456    ln -s "${lib_dir}/98vboxadd-xclient" /usr/bin/VBoxClient-all 2>/dev/null
    458457}
  • trunk/src/VBox/Additions/linux/installer/vboxadd.sh

    r67736 r68705  
    6060QUIET=
    6161
    62 # Rotate log files
    63 mv "${LOG}.3" "${LOG}.4" 2>/dev/null
    64 mv "${LOG}.2" "${LOG}.3" 2>/dev/null
    65 mv "${LOG}.1" "${LOG}.2" 2>/dev/null
    66 mv "${LOG}" "${LOG}.1" 2>/dev/null
     62setup_log()
     63{
     64    test -n "${LOG}" && return 0
     65    # Rotate log files
     66    LOG="/var/log/vboxadd-setup.log"
     67    mv "${LOG}.3" "${LOG}.4" 2>/dev/null
     68    mv "${LOG}.2" "${LOG}.3" 2>/dev/null
     69    mv "${LOG}.1" "${LOG}.2" 2>/dev/null
     70    mv "${LOG}" "${LOG}.1" 2>/dev/null
     71}
    6772
    6873if $MODPROBE -c 2>/dev/null | grep -q '^allow_unsupported_modules  *0'; then
     
    120125log()
    121126{
     127    setup_log
    122128    echo "${1}" >> "${LOG}"
    123129}
     
    333339    info "Building the VirtualBox Guest Additions kernel modules."
    334340
     341    # We are allowed to do ">> $LOG" after we have called "log()" once.
    335342    log "Building the main Guest Additions module."
    336343    if ! $BUILDINTMP \
Note: See TracChangeset for help on using the changeset viewer.

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