Changeset 75963 in vbox
- Timestamp:
- Dec 5, 2018 9:53:40 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/installer/vboxadd.sh
r75839 r75963 436 436 } 437 437 438 create_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}" 448 exit 0 449 EOF 450 cat << EOF > /etc/kernel/prerm.d/vboxadd 451 #!/bin/sh 452 for i in ${OLDMODULES}; do rm -f /lib/modules/"\${1}"/misc/"\${i}".ko; done 453 rmdir -p /lib/modules/"\$1"/misc 2>/dev/null 454 exit 0 455 EOF 456 chmod 0755 /etc/kernel/postinst.d/vboxadd /etc/kernel/prerm.d/vboxadd 457 } 458 438 459 shared_folder_setup() 439 460 { … … 492 513 create_vbox_user 493 514 create_udev_rule 515 test -n "${INSTALL_NO_MODULE_BUILDS}" || create_module_rebuild_script 494 516 test -z "$QUICKSETUP" || return 0 495 517 shared_folder_setup … … 518 540 519 541 # 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 520 546 rm /sbin/mount.vboxsf 2>/dev/null 521 547 rm /etc/udev/rules.d/60-vboxadd.rules 2>/dev/null
Note:
See TracChangeset
for help on using the changeset viewer.