VirtualBox

Changeset 69428 in vbox for trunk/src/VBox/Installer


Ignore:
Timestamp:
Oct 27, 2017 1:06:27 PM (7 years ago)
Author:
vboxsync
Message:

Installer/linux/vboxdrv.sh: always clean up empty kernel driver misc folders.
bugref:3809: Linux installer maintenance
When we clean up and remove our host kernel drivers, we also check to see if
we are leaving behind an empty misc folder in the kernel driver tree, and if
so we delete it. However we were not always as careful in the past, with
the result that many systems have a number of driver folders for different
kernel versions, empty except for an empty misc folder. This change makes
us delete those if we find them during clean-up.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/vboxdrv.sh

    r68027 r69428  
    384384            rm -f "${i}/misc/vboxdrv.ko" "${i}/misc/vboxnetadp.ko" \
    385385                  "${i}/misc/vboxnetflt.ko" "${i}/misc/vboxpci.ko"
    386             # Remove the kernel version folder if it was empty except for us.
    387             test   "`echo ${i}/misc/* ${i}/misc/.?* ${i}/* ${i}/.?*`" \
    388                  = "${i}/misc/* ${i}/misc/.. ${i}/misc ${i}/.." &&
    389                 rmdir "${i}/misc" "${i}"  # We used to leave empty folders.
    390386            version=`expr "${i}" : "/lib/modules/\(.*\)"`
    391387            depmod -a "${version}"
    392388        fi
     389        # Remove the kernel version folder if it was empty except for us.
     390        test   "`echo ${i}/misc/* ${i}/misc/.?* ${i}/* ${i}/.?*`" \
     391             = "${i}/misc/* ${i}/misc/.. ${i}/misc ${i}/.." &&
     392            rmdir "${i}/misc" "${i}"  # We used to leave empty folders.
    393393    done
    394394}
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