VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/installer/install.sh.in@ 75839

Last change on this file since 75839 was 75839, checked in by vboxsync, 6 years ago

Additions/linux/installer: build new kernel modules on system stop.
bugref:3809: Linux installer maintenance
With this change, we stop trying to use the DKMS hooks to rebuild kernel
modules, as they have proved too unreliable to be useful. Instead we now
simply rebuild for new kernels found at shutdown time, and again on start-up
in case there was a hard shutdown. Also clean up quite a bit of shell script
and improve the udev detection.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 20.2 KB
Line 
1#!/bin/sh
2#
3# Oracle VM VirtualBox
4# VirtualBox Makeself installation starter script
5# for Linux Guest Additions
6
7#
8# Copyright (C) 2006-2017 Oracle Corporation
9#
10# This file is part of VirtualBox Open Source Edition (OSE), as
11# available from http://www.virtualbox.org. This file is free software;
12# you can redistribute it and/or modify it under the terms of the GNU
13# General Public License (GPL) as published by the Free Software
14# Foundation, in version 2 as it comes in the "COPYING" file of the
15# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17#
18
19# Testing:
20# * After successful installation, 0 is returned if the vboxguest module version
21# built matches the one loaded and 2 is returned otherwise. E.g. VBoxClient
22# running will prevent vboxguest reloading.
23# * If the kernel modules cannot be built (run the installer with KERN_VER=none)
24# or loaded (run with KERN_VER=<installed non-current version>) then 1 is
25# returned.
26
27PATH=$PATH:/bin:/sbin:/usr/sbin
28
29# Note: These variable names must *not* clash with variables in $CONFIG_DIR/$CONFIG!
30PACKAGE="VBoxGuestAdditions"
31PACKAGE_NAME="VirtualBox Guest Additions"
32UNINSTALL="uninstall.sh"
33PUBLIC_UNINSTALL_HOOK="/usr/sbin/vbox-uninstall-guest-additions"
34ROUTINES="routines.sh"
35INSTALLATION_VER="_VERSION_"
36BUILD_TYPE="_BUILDTYPE_"
37USERNAME="_USERNAME_"
38UNINSTALL_SCRIPTS="vboxadd-x11 vboxvfs vboxadd-timesync vboxadd-service vboxadd"
39
40INSTALLATION_DIR="/opt/$PACKAGE-$INSTALLATION_VER"
41CONFIG_DIR="/var/lib/$PACKAGE"
42CONFIG="config"
43CONFIG_FILES="filelist"
44SELF=$1
45LOGFILE="/var/log/vboxadd-install.log"
46
47## Were we able to stop any previously running Additions kernel modules?
48MODULES_STOPPED=1
49
50. "./$ROUTINES"
51
52check_root
53
54check_deps bzip2 tar
55
56create_log "$LOGFILE"
57
58## @todo r=andy: Explain options like "force" and "no_setup" -- not self-explanatory
59# to the user.
60usage()
61{
62 catinfo << EOF
63
64Usage: $SELF install [<installation directory>]
65 [--with-<module>]
66 [--package-base <base> |
67 uninstall
68 [--force] [--no-setup]
69
70Options:
71 --package-base <base> For use when building distribution packages.
72 Installs relative to <base> instead of to "/",
73 does not run setup, installs to "<base>/usr/lib"
74 instead of to "/opt" and does not create uninstall.
75
76Example:
77$SELF install
78EOF
79 exit 1
80}
81
82# Create a symlink in the filesystem and add it to the list of package files
83add_symlink()
84{
85 self=add_symlink
86 ## Parameters:
87 # The file the link should point to
88 target="$1"
89 # The name of the actual symlink file. Must be an absolute path to a
90 # non-existing file in an existing directory.
91 link="$2"
92 link_dir="`dirname "$link"`"
93 test -n "$target" ||
94 { echo 1>&2 "$self: no target specified"; return 1; }
95 test -d "$link_dir" ||
96 { echo 1>&2 "$self: link directory $link_dir does not exist"; return 1; }
97 expr "$link" : "/.*" > /dev/null ||
98 { echo 1>&2 "$self: link file name is not absolute"; return 1; }
99 rm -f "$link"
100 ln -s "$target" "$link"
101 echo "$link" >> "$CONFIG_DIR/$CONFIG_FILES"
102}
103
104# Create symbolic links targeting all files in a directory in another
105# directory in the filesystem
106link_into_fs()
107{
108 ## Parameters:
109 # Directory containing the link target files
110 target_branch="$1"
111 # Directory to create the link files in
112 directory="$2"
113 for i in "$INSTALLATION_DIR/$target_branch"/*; do
114 test -e "$i" &&
115 add_symlink "$i" "$directory/`basename $i`"
116 done
117}
118
119# Look for broken installations or installations without a known uninstaller
120# and try to clean them up, asking the user first.
121def_uninstall()
122{
123 ## Parameters:
124 # Whether to force cleanup without asking the user
125 force="$1"
126
127 . ./deffiles
128 found=0
129 for i in "/opt/$PACKAGE-"*; do
130 test -e "$i" && found=1
131 done
132 for i in $DEFAULT_FILE_NAMES; do
133 test "$found" = 0 && test -e "$i" && found=1
134 done
135 test "$found" = 0 &&
136 for i in $DEFAULT_VERSIONED_FILE_NAMES; do
137 for j in $i-*; do
138 test "$found" = 0 && test -e "$j" && found=1
139 done
140 done
141 test "$found" = 0 && return 0
142 if ! test "$1" = "force" ; then
143 # Try to make the promised notification appear on next start.
144 VBoxControl guestproperty delete \
145 /VirtualBox/GuestAdd/HostVerLastChecked 2>&1 > /dev/null
146 cat 1>&2 << EOF
147This system appears to have a version of the VirtualBox Guest Additions
148already installed. If it is part of the operating system and kept up-to-date,
149there is most likely no need to replace it. If it is not up-to-date, you
150should get a notification when you start the system. If you wish to replace
151it with this version, please do not continue with this installation now, but
152instead remove the current version first, following the instructions for the
153operating system.
154
155If your system simply has the remains of a version of the Additions you could
156not remove you should probably continue now, and these will be removed during
157installation.
158
159Do you wish to continue? [yes or no]
160EOF
161 read reply dummy
162 if ! expr "$reply" : [yY] > /dev/null &&
163 ! expr "$reply" : [yY][eE][sS] > /dev/null
164 then
165 info
166 info "Cancelling installation."
167 return 1
168 fi
169 fi
170 # Inhibit rebuilding of any installed kernels.
171 for i in /lib/modules/*; do
172 ver="${i##*/}"
173 test ! -d "$i"/build || touch /var/lib/VBoxGuestAdditions/skip-"$ver"
174 done
175 # Stop what we can in the way of services and remove them from the
176 # system
177 for i in $UNINSTALL_SCRIPTS; do
178 stop_init_script "$i" 2>> "${LOGFILE}"
179 test -z "$NO_CLEANUP" && test -x "./$i" && "./$i" cleanup 1>&2 2>> "$LOGFILE"
180 delrunlevel "$i" 2>> "${LOGFILE}"
181 remove_init_script "$i" 2>> "${LOGFILE}"
182 done
183 for i in "/opt/$PACKAGE-"*/init; do
184 for j in $UNINSTALL_SCRIPTS; do
185 script="${i}/${j}"
186 test -x "${script}" && test -z "$NO_CLEANUP" &&
187 grep -q '^# *cleanup_script *$' "${script}" &&
188 "${script}" cleanup 1>&2 2>> "$LOGFILE"
189 done
190 done
191
192 # Get rid of any remaining files
193 for i in $DEFAULT_FILE_NAMES; do
194 rm -f "$i" 2> /dev/null
195 done
196 for i in $DEFAULT_VERSIONED_FILE_NAMES; do
197 rm -f "$i-"* 2> /dev/null
198 done
199 rm -f "/usr/lib/$PACKAGE" "/usr/lib64/$PACKAGE" "/usr/share/$PACKAGE" \
200 "/usr/lib/i386-linux-gnu/$PACKAGE" "/usr/lib/x86_64-linux-gnu/$PACKAGE"
201
202 # And any packages left under /opt
203 for i in "/opt/$PACKAGE-"*; do
204 test -d "$i" && rm -rf "$i"
205 done
206 return 0
207}
208
209info "$PACKAGE_NAME installer"
210
211# Sensible default actions
212ACTION="install"
213DO_SETUP="true"
214NO_CLEANUP=""
215FORCE_UPGRADE=""
216PACKAGE_BASE=""
217
218while [ $# -ge 2 ];
219do
220 ARG=$2
221 shift
222
223 if [ -z "$MY_END_OF_OPTIONS" ]; then
224 case "$ARG" in
225
226 install)
227 ACTION="install"
228 ;;
229
230 uninstall)
231 ACTION="uninstall"
232 ;;
233
234 package)
235 ACTION="package"
236 INSTALLATION_DIR=/usr/lib
237 PACKAGE_BASE="$2"
238 DO_SETUP=""
239 shift
240 if test ! -d "${PACKAGE_BASE}"; then
241 info "Package base directory not found."
242 usage
243 fi
244 ;;
245
246 ## @todo Add per-module options handling, e.g. --lightdm-greeter-dir
247 # or --lightdm-config
248
249 ## @todo Add listing all available modules (+ their options, e.g.
250 # with callback mod_mymod_show_options?)
251
252 --with-*)
253 MODULE_CUR=`expr "$ARG" : '--with-\(.*\)'`
254 # Check if corresponding module in installer/module-$1 exists.
255 # Note: Module names may not contain spaces or other funny things.
256 if [ ! -f "./installer/module-${MODULE_CUR}" ]; then
257 info "Error: Module \"${MODULE_CUR}\" does not exist."
258 usage
259 fi
260 # Give the module the chance of doing initialization work / checks.
261 . "./installer/module-${MODULE_CUR}"
262 mod_${MODULE_CUR}_init
263 if test $? -ne 0; then
264 echo 1>&2 "Module '${MODULE_CUR}' failed to initialize"
265 if ! test "$FORCE_UPGRADE" = "force"; then
266 return 1
267 fi
268 # Continue initialization.
269 fi
270 # Add module to the list of modules to handle later.
271 if test -z "${INSTALLATION_MODULES_LIST}"; then
272 INSTALLATION_MODULES_LIST="${MODULE_CUR}"
273 else
274 INSTALLATION_MODULES_LIST="${INSTALLATION_MODULES_LIST} ${MODULE_CUR}"
275 fi
276 shift
277 ;;
278
279 --force|force) # Keep "force" for backwards compatibility.
280 FORCE_UPGRADE="force"
281 ;;
282
283 --no-setup|no_setup) # Keep "no_setup" for backwards compatibility.
284 DO_SETUP=""
285 ;;
286
287 --no-cleanup|no_cleanup) # Keep "no_cleanup" for backwards compatibility.
288 # Do not do cleanup of old modules when removing them. For
289 # testing purposes only.
290 DO_SETUP=""
291 NO_CLEANUP="no_cleanup"
292 ;;
293
294 --)
295 MY_END_OF_OPTIONS="1"
296 ;;
297
298 *)
299 if [ "`echo $1|cut -c1`" != "/" ]; then
300 info "Please specify an absolute path"
301 usage
302 fi
303 INSTALLATION_DIR="$1"
304 shift
305 ;;
306 esac
307 fi
308done
309
310# Check architecture
311cpu=`uname -m`;
312case "$cpu" in
313 i[3456789]86|x86)
314 cpu="x86"
315 lib_candidates="/usr/lib/i386-linux-gnu /usr/lib /lib"
316 ;;
317 x86_64|amd64)
318 cpu="amd64"
319 lib_candidates="/usr/lib/x86_64-linux-gnu /usr/lib64 /usr/lib /lib64 /lib"
320 ;;
321 *)
322 cpu="unknown"
323esac
324ARCH_PACKAGE="$PACKAGE-$cpu.tar.bz2"
325if [ ! -r "$ARCH_PACKAGE" ]; then
326 info "Detected unsupported $cpu machine type."
327 exit 1
328fi
329# Find the most appropriate libary folder by seeing which of the candidate paths
330# are actually in the shared linker path list and choosing the first. We look
331# for Debian-specific paths first, then LSB ones, then the new RedHat ones.
332libs=`ldconfig -v 2>/dev/null | grep -v ^$'\t'`
333for i in $lib_candidates; do
334 if echo $libs | grep -q $i; then
335 lib_path=$i
336 break
337 fi
338done
339if [ ! -x "$lib_path" ]; then
340 info "Unable to determine correct library path."
341 exit 1
342fi
343
344# uninstall any previous installation
345# If the currently installed Additions have provided an uninstallation hook, try
346# that first.
347if test -x "${PUBLIC_UNINSTALL_HOOK}"; then
348 "${PUBLIC_UNINSTALL_HOOK}" 1>&2 ||
349 abort "Failed to remove existing installation. Aborting..."
350fi
351
352INSTALL_DIR=""
353uninstalled=0
354test -r "$CONFIG_DIR/$CONFIG" &&
355 eval `grep ^INSTALL_DIR= "$CONFIG_DIR/$CONFIG"` 2>/dev/null &&
356 eval `grep ^UNINSTALLER= "$CONFIG_DIR/$CONFIG"` 2>/dev/null
357if test -n "$INSTALL_DIR" -a -x "$INSTALL_DIR/$UNINSTALLER"; then
358 "$INSTALL_DIR/$UNINSTALLER" $NO_CLEANUP 1>&2 ||
359 abort "Failed to remove existing installation. Aborting..."
360 uninstalled=1
361fi
362test "$uninstalled" = 0 && def_uninstall "$FORCE_UPGRADE" && uninstalled=1
363test "$uninstalled" = 0 && exit 1
364rm -f "$CONFIG_DIR/$CONFIG"
365rm -f "$CONFIG_DIR/$CONFIG_FILES"
366rmdir "$CONFIG_DIR" 2>/dev/null
367test "$ACTION" = "install" || exit 0
368
369# Now check whether the kernel modules were stopped.
370lsmod | grep -q vboxguest && MODULES_STOPPED=
371
372# Choose a proper umask
373umask 022
374
375# Set installer modules directory
376INSTALLATION_MODULES_DIR="$INSTALLATION_DIR/installer/"
377
378# install the new version
379mkdir -p -m 755 "$CONFIG_DIR"
380test ! -d "$INSTALLATION_DIR" && REMOVE_INSTALLATION_DIR=1
381mkdir -p -m 755 "$INSTALLATION_DIR"
382
383# install and load installer modules
384if [ -d installer ]; then
385 info "Copying additional installer modules ..."
386 mkdir -p -m 755 "$INSTALLATION_MODULES_DIR"
387 for CUR_FILE in `ls installer/*`; do
388 install -p -m 755 "$CUR_FILE" "$INSTALLATION_MODULES_DIR"
389 if [ $? -ne 0 ]; then
390 info "Error: Failed to copy installer module \"$CUR_FILE\""
391 if ! test "$FORCE_UPGRADE" = "force"; then
392 exit 1
393 fi
394 fi
395 done
396fi
397
398# Create a list of the files in the archive, skipping any directories which
399# already exist in the filesystem.
400bzip2 -d -c "$ARCH_PACKAGE" | tar -tf - |
401 while read name; do
402 fullname="$INSTALLATION_DIR/$name"
403 case "$fullname" in
404 */)
405 test ! -d "$fullname" &&
406 echo "$fullname" >> "$CONFIG_DIR/$CONFIG_FILES"
407 ;;
408 *)
409 echo "$fullname" >> "$CONFIG_DIR/$CONFIG_FILES"
410 ;;
411 esac
412 done
413bzip2 -d -c "$ARCH_PACKAGE" | tar -xf - -C "$INSTALLATION_DIR" || exit 1
414
415# Set symlinks into /usr and /sbin
416link_into_fs "bin" "${PACKAGE_BASE}/usr/bin"
417link_into_fs "sbin" "${PACKAGE_BASE}/usr/sbin"
418link_into_fs "lib" "$lib_path"
419link_into_fs "src" "${PACKAGE_BASE}/usr/src"
420
421if [ -d "$INSTALLATION_MODULES_DIR" ]; then
422 info "Installing additional modules ..."
423 for CUR_MODULE in `find "$INSTALLATION_MODULES_DIR" 2>/dev/null`
424 do
425 echo "$CUR_MODULE" >> "$CONFIG_DIR/$CONFIG_FILES"
426 done
427fi
428
429for CUR_MODULE in ${INSTALLATION_MODULES_LIST}
430do
431 mod_${CUR_MODULE}_install
432 if [ $? -ne 0 ]; then
433 info "Error: Failed to install module \"$CUR_MODULE\""
434 if ! test "$FORCE_UPGRADE" = "force"; then
435 exit 1
436 fi
437 fi
438done
439
440# Remember our installation configuration before we call any init scripts
441cat > "$CONFIG_DIR/$CONFIG" << EOF
442# $PACKAGE installation record.
443# Package installation directory
444INSTALL_DIR='$INSTALLATION_DIR'
445# Additional installation modules
446INSTALL_MODULES_DIR='$INSTALLATION_MODULES_DIR'
447INSTALL_MODULES_LIST='$INSTALLATION_MODULES_LIST'
448# Package uninstaller. If you repackage this software, please make sure
449# that this prints a message and returns an error so that the default
450# uninstaller does not attempt to delete the files installed by your
451# package.
452UNINSTALLER='$UNINSTALL'
453# Package version
454INSTALL_VER='$INSTALLATION_VER'
455# Build type and user name for logging purposes
456BUILD_TYPE='$BUILD_TYPE'
457USERNAME='$USERNAME'
458EOF
459
460# Give the modules the chance to write their stuff
461# to the installation config as well.
462if [ -n "${INSTALLATION_MODULES_LIST}" ]; then
463 info "Saving modules configuration ..."
464 for CUR_MODULE in ${INSTALLATION_MODULES_LIST}
465 do
466 echo "`mod_${CUR_MODULE}_config_save`" >> "$CONFIG_DIR/$CONFIG"
467 done
468fi
469
470"$INSTALLATION_DIR/init/vboxadd" setup 1>&2 2>> "${LOGFILE}"
471
472# Install, set up and start init scripts
473for i in "$INSTALLATION_DIR/init/vboxadd" "$INSTALLATION_DIR/init/vboxadd-service"; do
474 install_init_script "$i" "`basename "$i"`" 2>> "${LOGFILE}"
475 addrunlevel "`basename "$i"`" 2>> "${LOGFILE}"
476 start_init_script "`basename "$i"`" 2>> "${LOGFILE}"
477done
478
479cp $ROUTINES $INSTALLATION_DIR
480echo $INSTALLATION_DIR/$ROUTINES >> "$CONFIG_DIR/$CONFIG_FILES"
481cat > $INSTALLATION_DIR/$UNINSTALL << EOF
482#!/bin/sh
483# Auto-generated uninstallation file
484
485PATH=\$PATH:/bin:/sbin:/usr/sbin
486LOGFILE="/var/log/vboxadd-uninstall.log"
487
488# Read routines.sh
489if ! test -r "$INSTALLATION_DIR/$ROUTINES"; then
490 echo 1>&2 "Required file $ROUTINES not found. Aborting..."
491 return 1
492fi
493. "$INSTALLATION_DIR/$ROUTINES"
494
495# We need to be run as root
496check_root
497
498create_log "\$LOGFILE"
499
500echo 1>&2 "Removing installed version $INSTALLATION_VER of $PACKAGE_NAME..."
501
502NO_CLEANUP=""
503if test "\$1" = "no_cleanup"; then
504 shift
505 NO_CLEANUP="no_cleanup"
506fi
507
508test -r "$CONFIG_DIR/$CONFIG_FILES" || abort "Required file $CONFIG_FILES not found. Aborting..."
509
510# Stop and clean up all services
511for i in "$INSTALLATION_DIR/init/vboxadd-service" "$INSTALLATION_DIR/init/vboxadd"; do
512 if test -r "\$i"; then
513 stop_init_script "\`basename "\$i"\`" 2>> "${LOGFILE}"
514 test -z "\${NO_CLEANUP}" && grep -q '^# *cleanup_script *$' "\${i}" && "\${i}" cleanup 2>> "\$LOGFILE"
515 delrunlevel "\`basename "\$i"\`" 2>> "${LOGFILE}"
516 remove_init_script "\`basename "\$i"\`" 2>> "${LOGFILE}"
517 fi
518done
519
520# Load all modules
521# Important: This needs to be done before loading the configuration
522# value below to not override values which are set to a default
523# value in the modules itself.
524for CUR_MODULE in `find "$INSTALLATION_MODULES_DIR" -name "module-*" 2>/dev/null`
525 do
526 . "\$CUR_MODULE"
527 done
528
529# Load configuration values
530test -r "$CONFIG_DIR/$CONFIG" && . "$CONFIG_DIR/$CONFIG"
531
532# Call uninstallation initialization of all modules
533for CUR_MODULE in "$INSTALLATION_MODULES_LIST"
534 do
535 if test -z "\$CUR_MODULE"; then
536 continue
537 fi
538 mod_\${CUR_MODULE}_pre_uninstall
539 if [ $? -ne 0 ]; then
540 echo 1>&2 "Module \"\$CUR_MODULE\" failed to initialize uninstallation"
541 # Continue initialization.
542 fi
543 done
544
545# Call uninstallation of all modules
546for CUR_MODULE in "$INSTALLATION_MODULES_LIST"
547 do
548 if test -z "\$CUR_MODULE"; then
549 continue
550 fi
551 mod_\${CUR_MODULE}_uninstall
552 if [ $? -ne 0 ]; then
553 echo 1>&2 "Module \"\$CUR_MODULE\" failed to uninstall"
554 # Continue uninstallation.
555 fi
556 done
557
558# And remove all files and empty installation directories
559# Remove any non-directory entries
560cat "$CONFIG_DIR/$CONFIG_FILES" | xargs rm 2>/dev/null
561# Remove any empty (of files) directories in the file list
562cat "$CONFIG_DIR/$CONFIG_FILES" |
563 while read file; do
564 case "\$file" in
565 */)
566 test -d "\$file" &&
567 find "\$file" -depth -type d -exec rmdir '{}' ';' 2>/dev/null
568 ;;
569 esac
570 done
571
572# Remove configuration files
573rm "$CONFIG_DIR/$CONFIG_FILES" 2>/dev/null
574rm "$CONFIG_DIR/$CONFIG" 2>/dev/null
575rmdir "$CONFIG_DIR" 2>/dev/null
576exit 0
577EOF
578chmod 0755 $INSTALLATION_DIR/$UNINSTALL
579echo $INSTALLATION_DIR/$UNINSTALL >> "$CONFIG_DIR/$CONFIG_FILES"
580test -n "$REMOVE_INSTALLATION_DIR" &&
581 echo "$INSTALLATION_DIR/" >> "$CONFIG_DIR/$CONFIG_FILES"
582
583cat > "${PUBLIC_UNINSTALL_HOOK}" << EOF
584#!/bin/sh
585# This executable provides a well-known way to uninstall VirtualBox Guest
586# Additions in order to re-install them from a different source. A common case
587# is uninstalling distribution-provide Additions to install the version provided
588# by VirtualBox. Distributions should put the right command in here to do the
589# removal, e.g. "dnf remove VirtualBox-guest-additions". Leaving kernel modules
590# provided by the distribution kernel package in place is acceptable if the
591# location does not clash with the VirtualBox-provided module location (misc).
592$INSTALLATION_DIR/$UNINSTALL
593EOF
594chmod 0755 "${PUBLIC_UNINSTALL_HOOK}"
595echo "$PUBLIC_UNINSTALL_HOOK" >> "$CONFIG_DIR/$CONFIG_FILES"
596
597# Test for a problem with old Mesa versions which stopped our 3D libraries
598# from working. Known to affect Debian 7.11, probably OL/RHEL 5.
599# The problem was that the system Mesa library had an ABI note, which caused
600# ldconfig to always prefer it to ours.
601if ldconfig -p | grep -q "libGL.so.1.*Linux 2.4"; then
602 gl_with_abi=`ldconfig -p | grep "libGL.so.1.*Linux 2.4" | sed 's/.*=> //'`
603 cat >&2 << EOF
604This system appears to be running a version of Mesa with a known problem
605which will prevent VirtualBox 3D pass-through from working. See
606 https://bugs.freedesktop.org/show_bug.cgi?id=26663
607The following, run as root should fix this, though you will have to run it
608again if the system version of Mesa is updated:
609EOF
610 for i in ${gl_with_abi}; do
611 echo >&2 " strip -R .note.ABI-tag ${i}"
612 done
613 echo >&2 " ldconfig"
614fi
615
616# And do a final test as to whether the kernel modules were properly created
617# and loaded. Return 0 if both are true, 1 if the modules could not be built
618# or loaded (except due to already running older modules) and 2 if already
619# running modules probably prevented new ones from loading. vboxvideo is
620# currently not tested.
621# Assume that we have already printed enough messages by now and stay silent.
622modinfo vboxguest >/dev/null 2>&1 || exit 1
623lsmod | grep -q vboxguest || exit 1
624test -n "${MODULES_STOPPED}" || exit 2
625exit 0
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette