VirtualBox

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

Last change on this file since 99505 was 98689, checked in by vboxsync, 23 months ago

Additions: Linux: Installer: Run "vboxadd setup" after Additions' (systemd) services installed in system, bugref:10359.

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