Changeset 62844 in vbox for trunk/src/VBox/Additions/linux
- Timestamp:
- Aug 1, 2016 6:11:12 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/installer/vboxadd.sh
r62830 r62844 39 39 SCRIPTNAME=vboxadd.sh 40 40 QUICKSETUP= 41 42 # These are getting hard-coded in more and more places...43 test -z "${KERN_DIR}" && KERN_DIR="/lib/modules/`uname -r`/build"44 test -z "${MODULE_DIR}" && MODULE_DIR="/lib/modules/`uname -r`/misc"45 KERN_DIR_SUFFIX="${KERN_DIR#/lib/modules/}"46 KERN_VER="${KERN_DIR_SUFFIX%/*}"47 41 48 42 if $MODPROBE -c 2>/dev/null | grep -q '^allow_unsupported_modules *0'; then … … 281 275 } 282 276 283 ## Update the initramfs. Debian and Ubuntu put the graphics driver in, and284 # need the touch(1) command below. Everyone else that I checked just need285 # the right module alias file from depmod(1) and only use the initramfs to286 # load the root filesystem, not the boot splash. update-initramfs works287 # for the first two and dracut for every one else I checked. We are only288 # interested in distributions recent enough to use the KMS vboxvideo driver.289 ## @param $1 kernel version to update for.290 update_module_dependencies()291 {292 depmod "${1}"293 rm -f "/lib/modules/${1}/initrd/vboxvideo"294 test -d "/lib/modules/${1}/initrd" &&295 test -f "/lib/modules/${1}/misc/vboxvideo.ko" &&296 touch "/lib/modules/${1}/initrd/vboxvideo"297 test -n "${QUICKSETUP}" && return298 if type dracut >/dev/null 2>&1; then299 dracut -f "/boot/initramfs-${1}.img" "${1}"300 elif type update-initramfs >/dev/null 2>&1; then301 update-initramfs -u -k "${1}"302 fi303 }304 305 277 # Remove any existing VirtualBox guest kernel modules from the disk, but not 306 278 # from the kernel as they may still be in use … … 356 328 fi 357 329 succ_msg 358 update_module_dependencies "${KERN_VER}"330 depmod 359 331 return 0 360 332 } … … 485 457 # Delete old versions of VBox modules. 486 458 cleanup_modules 487 for i in /lib/modules/*; do 488 update_module_dependencies "${i#/lib/modules/}" 489 done 459 depmod 490 460 491 461 # Remove old module sources … … 504 474 rmdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d 2>/dev/null 505 475 rm /etc/udev/rules.d/60-vboxadd.rules 2>/dev/null 506 rm -f /lib/modules/*/initrd/vboxvideo507 476 } 508 477
Note:
See TracChangeset
for help on using the changeset viewer.