Changeset 61260 in vbox for trunk/src/VBox/Additions/linux/installer
- Timestamp:
- May 28, 2016 7:48:13 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 107552
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/installer/vboxadd.sh
r61206 r61260 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%/*}" 41 47 42 48 if $MODPROBE -c 2>/dev/null | grep -q '^allow_unsupported_modules *0'; then … … 283 289 } 284 290 291 ## Update the initramfs. Debian and Ubuntu put the graphics driver in, and 292 # need the touch(1) command below. Everyone else that I checked just need 293 # the right module alias file from depmod(1) and only use the initramfs to 294 # load the root filesystem, not the boot splash. update-initramfs works 295 # for the first two and dracut for every one else I checked. We are only 296 # interested in distributions recent enough to use the KMS vboxvideo driver. 297 ## @param $1 kernel version to update for. 298 update_module_dependencies() 299 { 300 depmod "${1}" 301 test -d "/lib/modules/${1}/initrd" && 302 touch "/lib/modules/${1}/initrd/vboxvideo" 303 test -n "${QUICKSETUP}" && return 304 if type dracut >/dev/null 2>&1; then 305 dracut -f "/boot/initramfs-${1}.img" 306 elif type update-initramfs >/dev/null 2>&1; then 307 update-initramfs -u -k "${1}" 308 fi 309 } 310 285 311 # Remove any existing VirtualBox guest kernel modules from the disk, but not 286 312 # from the kernel as they may still be in use … … 337 363 fi 338 364 succ_msg 339 depmod365 update_module_dependencies "${KERN_VER}" 340 366 return 0 341 367 } … … 472 498 # Delete old versions of VBox modules. 473 499 cleanup_modules 474 depmod 500 for i in /lib/modules/*; do 501 update_module_dependencies "${i#/lib/modules}" 502 done 475 503 476 504 # Remove old module sources … … 489 517 rmdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d 2>/dev/null 490 518 rm /etc/udev/rules.d/60-vboxadd.rules 2>/dev/null 519 rm -f /lib/modules/*/initrd/vboxvideo 491 520 } 492 521
Note:
See TracChangeset
for help on using the changeset viewer.