VirtualBox

Changeset 75963 in vbox


Ignore:
Timestamp:
Dec 5, 2018 9:53:40 AM (6 years ago)
Author:
vboxsync
Message:

Additions/linux/installer: still use the DKMS hooks as well to rebuild drivers.
bugref:3809: Linux installer maintenance
The last change removed the DKMS hooks for rebuilding kernel modules as they
were not reliable, and replaced them with something more reliable but not
quite as nice. But actually having both will not hurt anyone, so restore
the hooks again.

File:
1 edited

Legend:

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

    r75839 r75963  
    436436}
    437437
     438create_module_rebuild_script()
     439{
     440    # And a post-installation script for rebuilding modules when a new kernel
     441    # is installed.
     442    mkdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d
     443    cat << EOF > /etc/kernel/postinst.d/vboxadd
     444#!/bin/sh
     445# This only works correctly on Debian derivatives - Red Hat calls it before
     446# installing the right header files.
     447/sbin/rcvboxadd quicksetup "\${1}"
     448exit 0
     449EOF
     450    cat << EOF > /etc/kernel/prerm.d/vboxadd
     451#!/bin/sh
     452for i in ${OLDMODULES}; do rm -f /lib/modules/"\${1}"/misc/"\${i}".ko; done
     453rmdir -p /lib/modules/"\$1"/misc 2>/dev/null
     454exit 0
     455EOF
     456    chmod 0755 /etc/kernel/postinst.d/vboxadd /etc/kernel/prerm.d/vboxadd
     457}
     458
    438459shared_folder_setup()
    439460{
     
    492513    create_vbox_user
    493514    create_udev_rule
     515    test -n "${INSTALL_NO_MODULE_BUILDS}" || create_module_rebuild_script
    494516    test -z "$QUICKSETUP" || return 0
    495517    shared_folder_setup
     
    518540
    519541    # Remove other files
     542    if test -z "${INSTALL_NO_MODULE_BUILDS}"; then
     543        rm -f /etc/kernel/postinst.d/vboxadd /etc/kernel/prerm.d/vboxadd
     544        rmdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d 2>/dev/null
     545    fi
    520546    rm /sbin/mount.vboxsf 2>/dev/null
    521547    rm /etc/udev/rules.d/60-vboxadd.rules 2>/dev/null
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