VirtualBox

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

Last change on this file since 91999 was 84947, checked in by vboxsync, 4 years ago

/linux/Makefile*,++: BUILD_TYPE -> VBOX_KBUILD_TYPE; BUILD_TARGET_ARCH -> VBOX_KBUILD_TARGET_ARCH

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