VirtualBox

Changeset 58326 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 20, 2015 9:34:06 AM (9 years ago)
Author:
vboxsync
Message:

Installers/linux: service output clean-up.

Location:
trunk/src/VBox
Files:
7 edited

Legend:

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

    r57985 r58326  
    2727
    2828PATH=$PATH:/bin:/sbin:/usr/sbin
    29 SCRIPTNAME=vboxadd-service
     29SCRIPTNAME=vboxadd-service.sh
    3030
    3131PIDFILE="/var/run/${SCRIPTNAME}"
     
    3939{
    4040    test -n "${2}" && echo "${SCRIPTNAME}: ${1}."
    41     logger "${SCRIPTNAME}: ${1}."
     41    logger -t "${SCRIPTNAME}" "${1}."
    4242}
    4343
    4444succ_msg()
    4545{
    46     logger "${SCRIPTNAME}: done."
     46    logger -t "${SCRIPTNAME}" "${1}."
    4747}
    4848
    4949fail_msg()
    5050{
    51     echo "${SCRIPTNAME}: failed." >&2
    52     logger "${SCRIPTNAME}: failed."
     51    echo "${SCRIPTNAME}: ${1}." >&2
     52    logger -t "${SCRIPTNAME}" "${1}."
    5353}
    5454
     
    9595        daemon $binary --pidfile $PIDFILE > /dev/null
    9696        RETVAL=$?
    97         succ_msg
     97        succ_msg "VirtualBox Guest Addition service started"
    9898    fi
    9999    return $RETVAL
     
    107107        if ! pidof VBoxService > /dev/null 2>&1; then
    108108            rm -f $PIDFILE
    109             succ_msg
     109            succ_msg "VirtualBox Guest Addition service stopped"
    110110        else
    111             fail_msg
     111            fail_msg "VirtualBox Guest Addition service failed to stop"
    112112        fi
    113113    fi
  • trunk/src/VBox/Additions/linux/installer/vboxadd-x11.sh

    r57945 r58326  
    3333CONFIG_DIR="/var/lib/VBoxGuestAdditions"
    3434CONFIG="config"
    35 SCRIPTNAME=vboxadd-x11
     35SCRIPTNAME=vboxadd-x11.sh
    3636
    3737# Check architecture
     
    7878{
    7979    test -n "${2}" && echo "${SCRIPTNAME}: ${1}."
    80     logger "${SCRIPTNAME}: ${1}."
     80    logger -t "${SCRIPTNAME}" "${1}."
    8181}
    8282
    8383succ_msg()
    8484{
    85     logger "${SCRIPTNAME}: done."
     85    logger -t "${SCRIPTNAME}" "${1}."
    8686}
    8787
    8888fail_msg()
    8989{
    90     echo "${SCRIPTNAME}: failed." >&2
    91     logger "${SCRIPTNAME}: failed."
     90    echo "${SCRIPTNAME}: ${1}." >&2
     91    logger -t "${SCRIPTNAME}" "${1}."
    9292}
    9393
     
    377377        ln -s "$lib_dir/$vboxmouse_src" "$modules_dir/input/vboxmouse_drv$driver_ext";;
    378378    esac
    379     succ_msg
     379    succ_msg "$xserver_version modules installed"
    380380
    381381    if test -n "$dox11config"; then
     
    418418            fi
    419419        fi
    420         succ_msg
     420        succ_msg "Window System set up to use the Guest Additions"
    421421        test -n "$generated" &&
    422422            cat << EOF
     
    476476        fail "See the log file $LOG for more information."
    477477    ln -s "$lib_dir/98vboxadd-xclient" /usr/bin/VBoxClient-all 2>/dev/null
    478     succ_msg
     478    succ_msg "Window system drivers installed"
    479479}
    480480
  • trunk/src/VBox/Additions/linux/installer/vboxadd.sh

    r57986 r58326  
    3434MODPROBE=/sbin/modprobe
    3535OLDMODULES="vboxguest vboxadd vboxsf vboxvfs vboxvideo"
    36 SCRIPTNAME=vboxadd
     36SCRIPTNAME=vboxadd.sh
    3737
    3838if $MODPROBE -c 2>/dev/null | grep -q '^allow_unsupported_modules  *0'; then
     
    6767{
    6868    test -n "${2}" && echo "${SCRIPTNAME}: ${1}."
    69     logger "${SCRIPTNAME}: ${1}."
     69    logger -t "${SCRIPTNAME}" "${1}."
    7070}
    7171
    7272succ_msg()
    7373{
    74     logger "${SCRIPTNAME}: done."
    75 }
    76 
    77 fail_msg()
    78 {
    79     echo "${SCRIPTNAME}: failed." >&2
    80     logger "${SCRIPTNAME}: failed."
     74    logger -t "${SCRIPTNAME}" "${1}."
    8175}
    8276
     
    8478{
    8579    echo "${SCRIPTNAME}: failed: ${1}." >&2
    86     logger "${SCRIPTNAME}: ${1}."
     80    logger -t "${SCRIPTNAME}" "${1}."
    8781}
    8882
     
    230224        $MODPROBE vboxsf > /dev/null 2>&1 || {
    231225            if dmesg | grep "vboxConnect failed" > /dev/null 2>&1; then
    232                 fail_msg
    233                 echo "Unable to start shared folders support.  Make sure that your VirtualBox build"
    234                 echo "supports this feature."
     226                show_error "Unable to start shared folders support.  Make sure that your VirtualBox build"
     227                show_error "supports this feature."
    235228                exit 1
    236229            fi
  • trunk/src/VBox/Installer/linux/vboxautostart-service.sh

    r57985 r58326  
    2727
    2828PATH=$PATH:/bin:/sbin:/usr/sbin
    29 SCRIPTNAME=vboxautostart-service
     29SCRIPTNAME=vboxautostart-service.sh
    3030
    3131[ -f /etc/debian_release -a -f /lib/lsb/init-functions ] || NOLSB=yes
     
    5252{
    5353    test -n "${2}" && echo "${SCRIPTNAME}: ${1}."
    54     logger "${SCRIPTNAME}: ${1}."
     54    logger -t "${SCRIPTNAME}" "${1}."
    5555}
    5656
    5757succ_msg()
    5858{
    59     logger "${SCRIPTNAME}: done."
     59    logger -t "${SCRIPTNAME}" "${1}."
    6060}
    6161
     
    6363{
    6464    echo "${SCRIPTNAME}: failed: ${1}." >&2
    65     logger "${SCRIPTNAME}: failed: ${1}."
     65    logger -t "${SCRIPTNAME}" "failed: ${1}."
    6666}
    6767
  • trunk/src/VBox/Installer/linux/vboxballoonctrl-service.sh

    r57985 r58326  
    2727
    2828PATH=$PATH:/bin:/sbin:/usr/sbin
    29 SCRIPTNAME=vboxballoonctrl-service
     29SCRIPTNAME=vboxballoonctrl-service.sh
    3030
    3131[ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg
     
    5353{
    5454    test -n "${2}" && echo "${SCRIPTNAME}: ${1}."
    55     logger "${SCRIPTNAME}: ${1}."
     55    logger -t "${SCRIPTNAME}" "${1}."
    5656}
    5757
    5858succ_msg()
    5959{
    60     logger "${SCRIPTNAME}: done."
     60    logger -t "${SCRIPTNAME}" "${1}."
    6161}
    6262
     
    6464{
    6565    echo "${SCRIPTNAME}: failed: ${1}." >&2
    66     logger "${SCRIPTNAME}: failed: ${1}."
     66    logger -t "${SCRIPTNAME}" "failed: ${1}."
    6767}
    6868
     
    141141            echo "$PID" > $PIDFILE
    142142            RETVAL=0
    143             succ_msg
     143            succ_msg "VirtualBox watchdog service started"
    144144        else
    145145            RETVAL=1
    146             fail_msg
     146            fail_msg "VirtualBox watchdog service failed to start"
    147147        fi
    148148    fi
     
    157157        if ! pidof $binary > /dev/null 2>&1; then
    158158            rm -f $PIDFILE
    159             succ_msg
     159            succ_msg "VirtualBox watchdog service stopped"
    160160        else
    161             fail_msg
     161            fail_msg "VirtualBox watchdog service failed to stop"
    162162        fi
    163163    fi
  • trunk/src/VBox/Installer/linux/vboxdrv.sh

    r58324 r58326  
    3131LOG="/var/log/vbox-install.log"
    3232MODPROBE=/sbin/modprobe
    33 SCRIPTNAME=vboxdrv
     33SCRIPTNAME=vboxdrv.sh
    3434
    3535# The below is GNU-specific.  See VBox.sh for the longer Solaris/OS X version.
     
    9191{
    9292    test -n "${2}" && echo "${SCRIPTNAME}: ${1}."
    93     logger "${SCRIPTNAME}: ${1}."
     93    logger -t "${SCRIPTNAME}" "${1}."
    9494}
    9595
    9696succ_msg()
    9797{
    98     logger "${SCRIPTNAME}: done."
     98    logger -t "${SCRIPTNAME}" "${1}."
    9999}
    100100
     
    102102{
    103103    echo "${SCRIPTNAME}: failed: ${1}." >&2
    104     logger "${SCRIPTNAME}: failed: ${1}."
     104    logger -t "${SCRIPTNAME}" "failed: ${1}."
    105105}
    106106
     
    310310        chown root:vboxusers /dev/vboxusb 2>/dev/null
    311311    fi
    312     succ_msg
     312    succ_msg "VirtualBox services started"
    313313}
    314314
     
    346346        fi
    347347    fi
    348     succ_msg
     348    succ_msg "VirtualBox services stopped"
    349349}
    350350
     
    370370                        $VBOXMANAGE --nologo controlvm $v poweroff
    371371                    done
    372                     succ_msg
     372                    succ_msg "Remaining VMs powered off"
    373373                elif [ "$SHUTDOWN" = "acpibutton" ]; then
    374374                    begin_msg "Sending ACPI power button event to remaining VMs"
     
    377377                        wait=30
    378378                    done
    379                     succ_msg
     379                    succ_msg "ACPI power button event sent to remaining VMs"
    380380                elif [ "$SHUTDOWN" = "savestate" ]; then
    381381                    begin_msg "Saving state of remaining VMs"
     
    383383                        $VBOXMANAGE --nologo controlvm $v savestate
    384384                    done
    385                     succ_msg
     385                    succ_msg "State of remaining VMs saved"
    386386                fi
    387387            fi
     
    392392        begin_msg "Waiting for $wait seconds for VM shutdown"
    393393        sleep $wait
    394         succ_msg
     394        succ_msg "Waited for $wait seconds for VM shutdown"
    395395    fi
    396396}
     
    448448    rm -f /etc/vbox/module_not_compiled
    449449    depmod -a
    450     succ_msg
     450    succ_msg "VirtualBox kernel modules built"
    451451}
    452452
  • trunk/src/VBox/Installer/linux/vboxweb-service.sh

    r57985 r58326  
    2727
    2828PATH=$PATH:/bin:/sbin:/usr/sbin
    29 SCRIPTNAME=vboxweb-service
     29SCRIPTNAME=vboxweb-service.sh
    3030
    3131[ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg
     
    5555{
    5656    test -n "${2}" && echo "${SCRIPTNAME}: ${1}."
    57     logger "${SCRIPTNAME}: ${1}."
     57    logger -t "${SCRIPTNAME}" "${1}."
    5858}
    5959
    6060succ_msg()
    6161{
    62     logger "${SCRIPTNAME}: done."
     62    logger -t "${SCRIPTNAME}" "${1}."
    6363}
    6464
     
    6666{
    6767    echo "${SCRIPTNAME}: failed: ${1}." >&2
    68     logger "${SCRIPTNAME}: failed: ${1}."
     68    logger -t "${SCRIPTNAME}" "failed: ${1}."
    6969}
    7070
     
    154154            echo "$PID" > $PIDFILE
    155155            RETVAL=0
    156             succ_msg
     156            succ_msg "VirtualBox web service started"
    157157        else
    158158            RETVAL=1
    159             fail_msg
     159            fail_msg "VirtualBox web service failed to start"
    160160        fi
    161161    fi
     
    170170        if ! pidof $binary > /dev/null 2>&1; then
    171171            rm -f $PIDFILE
    172             succ_msg
     172            succ_msg "VirtualBox web service stopped"
    173173        else
    174             fail_msg
     174            fail_msg "VirtualBox web service failed to stop"
    175175        fi
    176176    fi
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