VirtualBox

Changeset 99502 in vbox


Ignore:
Timestamp:
Apr 21, 2023 1:33:36 PM (21 months ago)
Author:
vboxsync
Message:

Additions/linux/installer: Added some docs. bugref:10359

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/installer/vboxadd.sh

    r99488 r99502  
    156156[ "$VBOX_REVISION" != "r" ] || VBOX_REVISION='unknown'
    157157
     158# Returns if the vboxguest module is running or not.
     159#
     160# Returns true if vboxguest module is running, false if not.
    158161running_vboxguest()
    159162{
     
    161164}
    162165
     166# Returns if the vboxadd module is running or not.
     167#
     168# Returns true if vboxadd module is running, false if not.
    163169running_vboxadd()
    164170{
     
    166172}
    167173
     174# Returns if the vboxsf module is running or not.
     175#
     176# Returns true if vboxsf module is running, false if not.
    168177running_vboxsf()
    169178{
     
    171180}
    172181
     182# Returns if the vboxvideo module is running or not.
     183#
     184# Returns true if vboxvideo module is running, false if not.
    173185running_vboxvideo()
    174186{
     
    176188}
    177189
     190# Returns if a specific module is running or not.
     191#
     192# Input $1: Module name to check running status for.
     193#
     194# Returns true if the module is running, false if not.
    178195running_module()
    179196{
     
    181198}
    182199
    183 # Get version string of currently running kernel module.
     200# Returns the version string of a currently running kernel module.
     201#
     202# Input $1: Module name to check.
     203#
     204# Returns the module version string if found, or none if not found.
    184205running_module_version()
    185206{
    186     mod=$1
     207    mod="$1"
    187208    version_string_path="/sys/module/"$mod"/version"
    188209
     
    195216}
    196217
    197 # Check if currently loaded kernel module version matches to
    198 # current Guest Additions installed version and revision.
     218# Checks if a loaded kernel module version matches to the currently installed Guest Additions version and revision.
     219#
     220# Input $1: Module name to check.
     221#
     222# Returns "1" if the module matches the installed Guest Additions, or none if not.
    199223check_running_module_version()
    200224{
     
    215239}
    216240
    217 ## Did we install a systemd service?
     241# Returns if we did install a service as a systemd service.
     242#
     243# Input $1: Service name to check.
     244#
     245# Returns true if the service is installed as a systemd service, false if not.
    218246systemd_service_installed()
    219247{
     
    225253}
    226254
    227 ## Perform an action on a service
     255## Performs an action on a service
    228256do_sysvinit_action()
    229257{
     
    296324}
    297325
    298 ## Update the initramfs.  Debian and Ubuntu put the graphics driver in, and
     326## Updates the initramfs.  Debian and Ubuntu put the graphics driver in, and
    299327# need the touch(1) command below.  Everyone else that I checked just need
    300328# the right module alias file from depmod(1) and only use the initramfs to
     
    324352}
    325353
    326 # Remove any existing VirtualBox guest kernel modules from the disk, but not
     354# Removes any existing VirtualBox guest kernel modules from the disk, but not
    327355# from the kernel as they may still be in use
    328356cleanup_modules()
     
    375403esac
    376404
    377 # Check if update-secureboot-policy tool supports required commandline options.
     405# Checks if update-secureboot-policy tool supports required commandline options.
    378406update_secureboot_policy_supports()
    379407{
     
    659687}
    660688
    661 # Returns path to module file as seen by modinfo(8) or empty string.
     689# Returns path to a module file as seen by modinfo(8), or none if not found.
     690#
     691# Input $1: Module name to get path for.
     692#
     693# Returns the module path as a string.
    662694module_path()
    663695{
     
    668700}
    669701
    670 # Returns module version if module is available or empty string.
     702# Returns module version if module is available, or none if not found.
     703#
     704# Input $1: Module name to get version for.
     705#
     706# Returns the module version as a string.
    671707module_version()
    672708{
     
    677713}
    678714
    679 # Returns module revision if module is available in the system or empty string.
     715# Returns the module revision if module is available in the system, or none if not found.
     716#
     717# Input $1: Module name to get revision for.
     718#
     719# Returns the module revision as a string.
    680720module_revision()
    681721{
     
    686726}
    687727
     728# Checks if a given kernel module is properly signed or not.
     729#
     730# Input $1: Module name to check.
     731#
    688732# Returns "1" if module is signed and signature can be verified
    689 # with public key provided in DEB_PUB_KEY. Or empty string otherwise.
     733# with public key provided in DEB_PUB_KEY, or none otherwise.
    690734module_signed()
    691735{
     
    743787}
    744788
     789# Checks if a given kernel module matches the installed VirtualBox Guest Additions version.
     790#
     791# Input $1: Module name to check.
     792#
    745793# Returns "1" if externally built module is available in the system and its
    746794# version and revision number do match to current VirtualBox installation.
    747 # Or empty string otherwise.
     795# None otherwise.
    748796module_available()
    749797{
     
    781829
    782830# Check if required modules are installed in the system and versions match.
     831#
     832# Returns "1" on success, none otherwise.
    783833setup_complete()
    784834{
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