VirtualBox

Changeset 58359 in vbox for trunk/src/VBox/Additions/linux


Ignore:
Timestamp:
Oct 21, 2015 1:48:39 PM (9 years ago)
Author:
vboxsync
Message:

Installer/linux (guest): remove confusing sanity checks.

File:
1 edited

Legend:

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

    r58357 r58359  
    9292owner=vboxadd
    9393group=1
    94 
    95 test_for_gcc_and_make()
    96 {
    97     which make > /dev/null 2>&1 || printf "\nThe make utility was not found. If the following module compilation fails then\nthis could be the reason and you should try installing it.\n"
    98     which gcc > /dev/null 2>&1 || printf "\nThe gcc utility was not found. If the following module compilation fails then\nthis could be the reason and you should try installing it.\n"
    99 }
    100 
    101 test_sane_kernel_dir()
    102 {
    103     KERN_VER=`uname -r`
    104     KERN_DIR="/lib/modules/$KERN_VER/build"
    105     if [ -d "$KERN_DIR" ]; then
    106         KERN_REL=`make -sC $KERN_DIR --no-print-directory kernelrelease 2>/dev/null || true`
    107         if [ -z "$KERN_REL" -o "x$KERN_REL" = "x$KERN_VER" ]; then
    108             return 0
    109         fi
    110     fi
    111     printf "\nThe headers for the current running kernel were not found. If the following\nmodule compilation fails then this could be the reason.\n"
    112     if which yum >/dev/null; then
    113         if echo "$KERN_VER" | grep -q "uek"; then
    114             printf "The missing package can be probably installed with\nyum install kernel-uek-devel-$KERN_VER\n"
    115         else
    116             printf "The missing package can be probably installed with\nyum install kernel-devel-$KERN_VER\n"
    117         fi
    118     elif which zypper >/dev/null; then
    119         KERN_VER_SUSE=`echo "$KERN_VER" | sed 's/.*-\([^-]*\)/\1/g'`
    120         KERN_VER_BASE=`echo "$KERN_VER" | sed 's/\(.*\)-[^-]*/\1/g'`
    121         printf "The missing package can be probably installed with\nzypper install kernel-$KERN_VER_SUSE-devel-$KERN_VER_BASE\n"
    122     elif which apt-get >/dev/null; then
    123         printf "The missing package can be probably installed with\napt-get install linux-headers-$KERN_VER\n"
    124     fi
    125 }
    12694
    12795running_vboxguest()
     
    290258    begin "Building the VirtualBox Guest Additions kernel modules"
    291259
    292     test_for_gcc_and_make
    293     test_sane_kernel_dir
    294 
    295260    begin "Building the main Guest Additions module"
    296261    if ! $BUILDINTMP \
     
    320285            --module-source $MODULE_SRC/vboxvideo \
    321286            --no-print-directory install >> $LOG 2>&1; then
    322             show_error "Look at $LOG to find out what went wrong. The module is not built but the others are."
     287            show_error "Look at $LOG to find out what went wrong.  All other modules were built successfully."
    323288        else
    324289            succ_msg
     
    413378    chcon -t bin_t "$BUILDINTMP" > /dev/null 2>&1
    414379
    415     setup_modules
     380    setup_modules || \
     381        show_error "Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed."
    416382    mod_succ="$?"
    417383    extra_setup
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