Changeset 98595 in vbox for trunk/src/VBox/Additions/linux
- Timestamp:
- Feb 15, 2023 5:25:30 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/installer/vboxadd.sh
r98476 r98595 70 70 QUIET= 71 71 test -z "${TARGET_VER}" && TARGET_VER=`uname -r` 72 73 # Marker to ignore a particular kernel version which was already installed.74 #75 # This is needed in order to prevent modules rebuild on system start and do76 # that on system shutdown instead. Modern Linux distributions might attempt77 # to run Additions service in async mode. As a result, on system boot, modules78 # not-by-us will be loaded while we will try to build our modules. This marker is:79 #80 # created -- in scope of setup_modules() when actual modules are built.81 # checked -- in scope of stop() when system goes shutdown and if marker82 # for certain kernel version does not exist, modules rebuild83 # will be triggered for this kernel version.84 # removed -- in scope of cleanup_modules() when modules are removed from85 # system for all installed kernels.86 SKIPFILE_BASE=/var/lib/VBoxGuestAdditions/skip87 72 88 73 export VBOX_KBUILD_TYPE … … 331 316 done 332 317 rm -f /etc/depmod.d/vboxvideo-upstream.conf 333 rm -f "$SKIPFILE_BASE"-*334 318 } 335 319 … … 546 530 547 531 update_initramfs "${KERN_VER}" 548 549 # We have just built modules for KERN_VER kernel. Create a marker to indicate550 # that modules for this kernel version should not be rebuilt on system shutdown.551 touch "$SKIPFILE_BASE"-"$KERN_VER"552 532 553 533 return 0 … … 873 853 ps -A -o comm | grep -q '/*udevd$' 2>/dev/null || 874 854 no_udev=1 875 running_vboxguest|| {855 check_running_module_version "vboxguest" || { 876 856 rm -f $dev || { 877 857 fail "Cannot remove $dev" … … 880 860 fail "Cannot remove $userdev" 881 861 } 882 $MODPROBE vboxguest >/dev/null 2>&1 || 883 fail "modprobe vboxguest failed" 884 case "$no_udev" in 1) 885 sleep .5;; 886 esac 887 $MODPROBE vboxsf > /dev/null 2>&1 || 888 info "modprobe vboxsf failed" 862 # Assuming modules were just (re-)built, try to reload everything. 863 reload 889 864 } 890 865 case "$no_udev" in 1) … … 899 874 { 900 875 begin "Stopping." 901 if test -z "${INSTALL_NO_MODULE_BUILDS}"; then 902 # We want to build modules for newly installed kernels on shutdown, so 903 # check which we marked at start-up. 904 for setupi in /lib/modules/*; do 905 KERN_VER="${setupi##*/}" 906 # For a full setup, mark kernels we do not want to build. 907 test -f "$SKIPFILE_BASE"-"$KERN_VER" || setup_modules "$KERN_VER" 908 done 909 fi 876 910 877 if test -r /etc/ld.so.conf.d/00vboxvideo.conf; then 911 878 rm /etc/ld.so.conf.d/00vboxvideo.conf … … 1083 1050 # since it's not loaded for very old guests. 1084 1051 for mod in vboxguest vboxsf; do 1085 check_running_module_version "$mod" || fail "currently loaded module $mod version ($(running_module_version "$mod") does not match to VirtualBox Guest Additions installation version ($VBOX_VERSION $VBOX_REVISION))"1052 check_running_module_version "$mod" || fail "currently loaded module $mod version ($(running_module_version "$mod")) does not match to VirtualBox Guest Additions installation version ($VBOX_VERSION $VBOX_REVISION)" 1086 1053 done 1087 1054 # Take reported version of running Guest Additions from running vboxguest module (as a paranoia check).
Note:
See TracChangeset
for help on using the changeset viewer.