VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/installer/vboxadd-x11.sh@ 57548

Last change on this file since 57548 was 56860, checked in by vboxsync, 10 years ago

Installers/linux: make init scripts work with recent ArchLinux versions.

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 21.4 KB
Line 
1#! /bin/sh
2#
3# Linux Additions X11 setup init script ($Revision: 56860 $)
4#
5
6#
7# Copyright (C) 2006-2012 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18
19# chkconfig: 35 30 70
20# description: VirtualBox Linux Additions kernel modules
21#
22### BEGIN INIT INFO
23# Provides: vboxadd-x11
24# Required-Start:
25# Required-Stop:
26# Default-Start:
27# Default-Stop:
28# Description: VirtualBox Linux Additions X11 setup
29### END INIT INFO
30
31PATH=$PATH:/bin:/sbin:/usr/sbin
32LOG="/var/log/vboxadd-install-x11.log"
33CONFIG_DIR="/var/lib/VBoxGuestAdditions"
34CONFIG="config"
35
36# Check architecture
37cpu=`uname -m`;
38case "$cpu" in
39 i[3456789]86|x86)
40 cpu="x86"
41 lib_candidates="/usr/lib/i386-linux-gnu /usr/lib /lib"
42 ;;
43 x86_64|amd64)
44 cpu="amd64"
45 lib_candidates="/usr/lib/x86_64-linux-gnu /usr/lib64 /usr/lib /lib64 /lib"
46 ;;
47esac
48for i in $lib_candidates; do
49 if test -d "$i/VBoxGuestAdditions"; then
50 LIB=$i
51 break
52 fi
53done
54
55# Find the version of X installed
56# The last of the three is for the X.org 6.7 included in Fedora Core 2
57xver=`X -version 2>&1`
58x_version=`echo "$xver" | sed -n 's/^X Window System Version \([0-9.]\+\)/\1/p'``echo "$xver" | sed -n 's/^XFree86 Version \([0-9.]\+\)/\1/p'``echo "$xver" | sed -n 's/^X Protocol Version 11, Revision 0, Release \([0-9.]\+\)/\1/p'``echo "$xver" | sed -n 's/^X.Org X Server \([0-9.]\+\)/\1/p'`
59x_version_short=`echo "${x_version}" | sed 's/\([0-9]*\.[0-9]*\)\..*/\1/'`
60# Version of Redhat or Fedora installed. Needed for setting up selinux policy.
61redhat_release=`cat /etc/redhat-release 2> /dev/null`
62# All the different possible locations for XFree86/X.Org configuration files
63# - how many of these have ever been used?
64x11conf_files="/etc/X11/xorg.conf /etc/X11/xorg.conf-4 /etc/X11/.xorg.conf \
65 /etc/xorg.conf /usr/etc/X11/xorg.conf-4 /usr/etc/X11/xorg.conf \
66 /usr/lib/X11/xorg.conf-4 /usr/lib/X11/xorg.conf /etc/X11/XF86Config-4 \
67 /etc/X11/XF86Config /etc/XF86Config /usr/X11R6/etc/X11/XF86Config-4 \
68 /usr/X11R6/etc/X11/XF86Config /usr/X11R6/lib/X11/XF86Config-4 \
69 /usr/X11R6/lib/X11/XF86Config"
70
71if [ -f /etc/redhat-release ]; then
72 system=redhat
73elif [ -f /etc/debian_version ]; then
74 system=debian
75elif [ -f /etc/SuSE-release ]; then
76 system=suse
77elif [ -f /etc/gentoo-release ]; then
78 system=gentoo
79elif [ -f /etc/lfs-release -a -d /etc/rc.d/init.d ]; then
80 system=lfs
81else
82 system=other
83fi
84
85if [ "$system" = "redhat" ]; then
86 . /etc/init.d/functions
87 fail_msg() {
88 echo_failure
89 echo
90 }
91 succ_msg() {
92 echo_success
93 echo
94 }
95 begin() {
96 echo -n "$1"
97 }
98fi
99
100if [ "$system" = "suse" ]; then
101 . /etc/rc.status
102 fail_msg() {
103 rc_failed 1
104 rc_status -v
105 }
106 succ_msg() {
107 rc_reset
108 rc_status -v
109 }
110 begin() {
111 echo -n "$1"
112 }
113fi
114
115if [ "$system" = "gentoo" ]; then
116 if [ -f /sbin/functions.sh ]; then
117 . /sbin/functions.sh
118 elif [ -f /etc/init.d/functions.sh ]; then
119 . /etc/init.d/functions.sh
120 fi
121 fail_msg() {
122 eend 1
123 }
124 succ_msg() {
125 eend $?
126 }
127 begin() {
128 ebegin $1
129 }
130 if [ "`which $0`" = "/sbin/rc" ]; then
131 shift
132 fi
133fi
134
135if [ "$system" = "lfs" ]; then
136 . /etc/rc.d/init.d/functions
137 fail_msg() {
138 echo_failure
139 }
140 succ_msg() {
141 echo_ok
142 }
143 begin() {
144 echo $1
145 }
146fi
147
148if [ "$system" = "debian" -o "$system" = "other" ]; then
149 fail_msg() {
150 echo " ...fail!"
151 }
152 succ_msg() {
153 echo " ...done."
154 }
155 begin() {
156 echo -n $1
157 }
158fi
159
160dev=/dev/vboxguest
161userdev=/dev/vboxuser
162owner=vboxadd
163group=1
164
165fail()
166{
167 if [ "$system" = "gentoo" ]; then
168 eerror $1
169 exit 1
170 fi
171 fail_msg
172 echo "($1)"
173 exit 1
174}
175
176# Install an X11 desktop startup application. The application should be a shell script.
177# Its name should be purely alphanumeric and should start with a two digit number (preferably
178# 98 or thereabouts) to indicate its place in the Debian Xsession startup order.
179#
180# syntax: install_x11_startup_app app desktop service_name
181install_x11_startup_app() {
182 self="install_x11_startup_app"
183 app_src=$1
184 desktop_src=$2
185 service_name=$3
186 alt_command=$4
187 test -r "$app_src" ||
188 { echo >> $LOG "$self: no script given"; return 1; }
189 test -r "$desktop_src" ||
190 { echo >> $LOG "$self: no desktop file given"; return 1; }
191 test -n "$service_name" ||
192 { echo >> $LOG "$self: no service given"; return 1; }
193 test -n "$alt_command" ||
194 { echo >> $LOG "$self: no service given"; return 1; }
195 app_dest=`basename $app_src sh`
196 app_dest_sh=`basename $app_src sh`.sh
197 desktop_dest=`basename $desktop_src`
198 found=0
199 x11_autostart="/etc/xdg/autostart"
200 kde_autostart="/usr/share/autostart"
201 redhat_dir=/etc/X11/Xsession.d
202 mandriva_dir=/etc/X11/xinit.d
203 debian_dir=/etc/X11/xinit/xinitrc.d
204 if [ -d "$mandriva_dir" -a -w "$mandriva_dir" -a -x "$mandriva_dir" ]
205 then
206 install -m 0644 $app_src "$mandriva_dir/$app_dest"
207 found=1
208 fi
209 if [ -d "$x11_autostart" -a -w "$x11_autostart" -a -x "$x11_autostart" ]
210 then
211 install -m 0644 $desktop_src "$x11_autostart/$desktop_dest"
212 found=1
213 fi
214 if [ -d "$kde_autostart" -a -w "$kde_autostart" -a -x "$kde_autostart" ]
215 then
216 install -m 0644 $desktop_src "$kde_autostart/$desktop_dest"
217 found=1
218 fi
219 if [ -d "$redhat_dir" -a -w "$redhat_dir" -a -x "$redhat_dir" ]
220 then
221 install -m 0644 $app_src "$redhat_dir/$app_dest"
222 found=1
223 fi
224 if [ -d "$debian_dir" -a -w "$debian_dir" -a -x "$debian_dir" ]
225 then
226 install -m 0755 $app_src "$debian_dir/$app_dest_sh"
227 found=1
228 fi
229 if [ $found -eq 1 ]; then
230 return 0
231 fi
232 cat >> $LOG << EOF
233Could not set up the $service_name desktop service.
234To start it at log-in for a given user, add the command $alt_command
235to the file .xinitrc in their home directory.
236EOF
237 return 1
238}
239
240
241start()
242{
243 # Todo: check configuration and correct it if necessary
244 return 0
245}
246
247stop()
248{
249 return 0
250}
251
252restart()
253{
254 stop && start
255 return 0
256}
257
258# setup_script
259setup()
260{
261 echo "VirtualBox Guest Additions installation, Window System and desktop setup" > $LOG
262 begin "Installing the Window System drivers"
263 lib_dir="$LIB/VBoxGuestAdditions"
264 share_dir="/usr/share/VBoxGuestAdditions"
265 test -x "$lib_dir" -a -x "$share_dir" ||
266 fail "Invalid Guest Additions configuration found"
267 # By default we want to configure X
268 dox11config="true"
269 # By default, we want to run our xorg.conf setup script
270 setupxorgconf="true"
271 # All but the oldest supported X servers can automatically set up the
272 # keyboard driver.
273 autokeyboard="--autoKeyboard"
274 # On more recent servers our kernel mouse driver will be used
275 # automatically
276 automouse="--autoMouse"
277 # We need to tell our xorg.conf hacking script whether /dev/psaux exists
278 nopsaux="--nopsaux"
279 case "`uname -r`" in 2.4.*)
280 test -c /dev/psaux && nopsaux="";;
281 esac
282 # Should we use the VMSVGA driver instead of VBoxVideo?
283 if grep 80eebeef /proc/bus/pci/devices > /dev/null; then
284 vmsvga=""
285 elif grep 15ad0405 /proc/bus/pci/devices > /dev/null; then
286 vmsvga="--vmsvga"
287 else
288 dox11config=""
289 fi
290 # The video driver to install for X.Org 6.9+
291 vboxvideo_src=
292 # The mouse driver to install for X.Org 6.9+
293 vboxmouse_src=
294 # The driver extension
295 driver_ext=".so"
296 # The configuration file we generate if no original was found but we need
297 # one.
298 main_cfg="/etc/X11/xorg.conf"
299
300 modules_dir=`X -showDefaultModulePath 2>&1` || modules_dir=
301 if [ -z "$modules_dir" ]; then
302 for dir in /usr/lib64/xorg/modules /usr/lib/xorg/modules /usr/X11R6/lib64/modules /usr/X11R6/lib/modules /usr/X11R6/lib/X11/modules; do
303 if [ -d $dir ]; then
304 modules_dir=$dir
305 break
306 fi
307 done
308 fi
309
310 test -z "$x_version" -o -z "$modules_dir" &&
311 {
312 echo
313 echo "Could not find the X.Org or XFree86 Window System, skipping."
314 exit 0
315 }
316
317 echo
318 # openSUSE 10.3 shipped X.Org 7.2 with X.Org Server 1.3, but didn't
319 # advertise the fact.
320 if grep -q '10\.3' /etc/SuSE-release 2>/dev/null; then
321 case $x_version in 7.2.*)
322 x_version=1.3.0;;
323 esac
324 fi
325 case $x_version in
326 1.*.99.* )
327 echo "Warning: unsupported pre-release version of X.Org Server installed. Not"
328 echo "installing the X.Org drivers."
329 dox11config=""
330 ;;
331 1.11.* )
332 xserver_version="X.Org Server 1.11"
333 vboxvideo_src=vboxvideo_drv_111.so
334 test "$system" = "redhat" && test -z "${vmsvga}" || setupxorgconf=""
335 ;;
336 1.10.* )
337 xserver_version="X.Org Server 1.10"
338 vboxvideo_src=vboxvideo_drv_110.so
339 test "$system" = "redhat" && test -z "${vmsvga}" || setupxorgconf=""
340 ;;
341 1.9.* )
342 xserver_version="X.Org Server 1.9"
343 vboxvideo_src=vboxvideo_drv_19.so
344 # Fedora 14 to 16 patched out vboxvideo detection
345 test "$system" = "redhat" && test -z "${vmsvga}" || setupxorgconf=""
346 ;;
347 1.8.* )
348 xserver_version="X.Org Server 1.8"
349 vboxvideo_src=vboxvideo_drv_18.so
350 # Fedora 13 shipped without vboxvideo detection
351 test "$system" = "redhat" && test -z "${vmsvga}" || setupxorgconf=""
352 ;;
353 1.7.* )
354 xserver_version="X.Org Server 1.7"
355 vboxvideo_src=vboxvideo_drv_17.so
356 setupxorgconf=""
357 ;;
358 1.6.* )
359 xserver_version="X.Org Server 1.6"
360 vboxvideo_src=vboxvideo_drv_16.so
361 vboxmouse_src=vboxmouse_drv_16.so
362 # SUSE SLE* with X.Org 1.6 does not do input autodetection;
363 # openSUSE does.
364 if grep -q -E '^SLE[^ ]' /etc/SuSE-brand 2>/dev/null; then
365 automouse=""
366 else
367 test "$system" = "suse" && setupxorgconf=""
368 fi
369 ;;
370 1.5.* )
371 xserver_version="X.Org Server 1.5"
372 vboxvideo_src=vboxvideo_drv_15.so
373 vboxmouse_src=vboxmouse_drv_15.so
374 # Historical note: SUSE with X.Org Server 1.5 disabled automatic
375 # mouse configuration and was handled specially. However since our
376 # kernel driver seems to have problems with X.Org Server 1.5 anyway
377 # we just create an X.Org configuration file and use the user space
378 # one generally, no longer just for SUSE.
379 automouse=""
380 ;;
381 1.4.* )
382 xserver_version="X.Org Server 1.4"
383 vboxvideo_src=vboxvideo_drv_14.so
384 vboxmouse_src=vboxmouse_drv_14.so
385 automouse=""
386 ;;
387 1.3.* )
388 # This was the first release which gave the server version number
389 # rather than the X11 release version when you did 'X -version'.
390 xserver_version="X.Org Server 1.3"
391 vboxvideo_src=vboxvideo_drv_13.so
392 vboxmouse_src=vboxmouse_drv_13.so
393 automouse=""
394 ;;
395 7.1.* | 7.2.* )
396 xserver_version="X.Org 7.1"
397 vboxvideo_src=vboxvideo_drv_71.so
398 vboxmouse_src=vboxmouse_drv_71.so
399 automouse=""
400 ;;
401 6.9.* | 7.0.* )
402 xserver_version="X.Org 6.9/7.0"
403 vboxvideo_src=vboxvideo_drv_70.so
404 vboxmouse_src=vboxmouse_drv_70.so
405 automouse=""
406 ;;
407 6.7* | 6.8.* | 4.2.* | 4.3.* )
408 # As the module binaries are the same we use one text for these
409 # four server versions.
410 xserver_version="XFree86 4.2/4.3 and X.Org 6.7/6.8"
411 driver_ext=.o
412 vboxvideo_src=vboxvideo_drv.o
413 vboxmouse_src=vboxmouse_drv.o
414 automouse=""
415 autokeyboard=""
416 case $x_version in
417 6.8.* )
418 autokeyboard="true"
419 ;;
420 4.2.* | 4.3.* )
421 main_cfg="/etc/X11/XF86Config"
422 ;;
423 esac
424 ;;
425 * )
426 # Anything else, including all X server versions as of 1.12.
427 xserver_version="X.Org Server ${x_version_short}"
428 vboxvideo_src=vboxvideo_drv_`echo ${x_version_short} | sed 's/\.//'`.so
429 setupxorgconf=""
430 test -f "${lib_dir}/${vboxvideo_src}" ||
431 {
432 echo "Warning: unknown version of the X Window System installed. Not installing"
433 echo "X Window System drivers."
434 dox11config=""
435 vboxvideo_src=""
436 }
437 ;;
438 esac
439 test -n "${dox11config}" &&
440 begin "Installing $xserver_version modules"
441 rm "$modules_dir/drivers/vboxvideo_drv$driver_ext" 2>/dev/null
442 rm "$modules_dir/input/vboxmouse_drv$driver_ext" 2>/dev/null
443 case "$vboxvideo_src" in ?*)
444 ln -s "$lib_dir/$vboxvideo_src" "$modules_dir/drivers/vboxvideo_drv$driver_ext";;
445 esac
446 case "$vboxmouse_src" in ?*)
447 ln -s "$lib_dir/$vboxmouse_src" "$modules_dir/input/vboxmouse_drv$driver_ext";;
448 esac
449 succ_msg
450
451 if test -n "$dox11config"; then
452 begin "Setting up the Window System to use the Guest Additions"
453 # Certain Ubuntu/Debian versions use a special PCI-id file to identify
454 # video drivers. Some versions have the directory and don't use it.
455 # Those versions can autoload vboxvideo though, so we don't need to
456 # hack the configuration file for them.
457 test "$system" = "debian" -a -d /usr/share/xserver-xorg/pci &&
458 {
459 rm -f "/usr/share/xserver-xorg/pci/vboxvideo.ids"
460 ln -s "$share_dir/vboxvideo.ids" /usr/share/xserver-xorg/pci 2>/dev/null
461 test -n "$automouse" && setupxorgconf=""
462 }
463
464 # Do the XF86Config/xorg.conf hack for those versions that require it
465 configured=""
466 generated=""
467 if test -n "$setupxorgconf"; then
468 for i in $x11conf_files; do
469 if test -r "$i"; then
470 if grep -q "VirtualBox generated" "$i"; then
471 generated="$generated `printf "$i\n"`"
472 else
473 "$lib_dir/x11config.sh" $autokeyboard $automouse $nopsaux $vmsvga "$i"
474 fi
475 configured="true"
476 fi
477 # Timestamp, so that we can see if the config file is changed
478 # by someone else later
479 test -r "$i.vbox" && touch "$i.vbox"
480 done
481 # X.Org Server 1.5 and 1.6 can detect hardware they know, but they
482 # need a configuration file for VBoxVideo.
483 nobak_cfg="`expr "${main_cfg}" : '\([^.]*\)'`.vbox.nobak"
484 if test -z "$configured"; then
485 touch "$main_cfg"
486 "$lib_dir/x11config.sh" $autokeyboard $automouse $nopsaux $vmsvga --noBak "$main_cfg"
487 touch "${nobak_cfg}"
488 fi
489 fi
490 succ_msg
491 test -n "$generated" &&
492 cat << EOF
493The following X.Org/XFree86 configuration files were originally generated by
494the VirtualBox Guest Additions and were not modified:
495
496$generated
497
498EOF
499 cat << EOF
500You may need to restart the the Window System (or just restart the guest system)
501to enable the Guest Additions.
502
503EOF
504 fi
505
506 begin "Installing graphics libraries and desktop services components"
507 case "$redhat_release" in
508 # Install selinux policy for Fedora 7 and 8 to allow the X server to
509 # open device files
510 Fedora\ release\ 7* | Fedora\ release\ 8* )
511 semodule -i "$share_dir/vbox_x11.pp" > /dev/null 2>&1
512 ;;
513 # Similar for the accelerated graphics check on Fedora 15
514 Fedora\ release\ 15* )
515 semodule -i "$share_dir/vbox_accel.pp" > /dev/null 2>&1
516 ;;
517 esac
518
519 # Install selinux policy for Fedora 8 to allow the X server to
520 # open our drivers
521 case "$redhat_release" in
522 Fedora\ release\ 8* )
523 chcon -u system_u -t lib_t "$lib_dir"/*.so
524 ;;
525 esac
526
527 # Our logging code generates some glue code on 32-bit systems. At least F10
528 # needs a rule to allow this. Send all output to /dev/null in case this is
529 # completely irrelevant on the target system.
530 chcon -t unconfined_execmem_exec_t '/usr/bin/VBoxClient' > /dev/null 2>&1
531 semanage fcontext -a -t unconfined_execmem_exec_t '/usr/bin/VBoxClient' > /dev/null 2>&1
532 # Install the guest OpenGL drivers. For now we don't support
533 # multi-architecture installations
534 for dir in /usr/lib/dri /usr/lib32/dri /usr/lib64/dri \
535 /usr/lib/xorg/modules/dri /usr/lib32/xorg/modules/dri \
536 /usr/lib64/xorg/modules/dri /usr/lib/i386-linux-gnu/dri \
537 /usr/lib/x86_64-linux-gnu/dri; do
538 if [ -d $dir ]; then
539 rm -f "$dir/vboxvideo_dri.so"
540 ln -s "$LIB/VBoxOGL.so" "$dir/vboxvideo_dri.so"
541 fi
542 done
543
544 # And set up VBoxClient to start when the X session does
545 install_x11_startup_app "$lib_dir/98vboxadd-xclient" "$share_dir/vboxclient.desktop" VBoxClient VBoxClient-all ||
546 fail "See the log file $LOG for more information."
547 ln -s "$lib_dir/98vboxadd-xclient" /usr/bin/VBoxClient-all 2>/dev/null
548 succ_msg
549}
550
551# cleanup_script
552cleanup()
553{
554 # Restore xorg.conf files as far as possible
555 # List of generated files which have been changed since we generated them
556 newer=""
557 # Are we dealing with a legacy information which didn't support
558 # uninstallation?
559 legacy=""
560 # Do any of the restored configuration files still reference our drivers?
561 failed=""
562 # Have we encountered a "nobak" configuration file which means that there
563 # is no original file to restore?
564 nobak=""
565 test -r "$CONFIG_DIR/$CONFIG" || legacy="true"
566 for main_cfg in "/etc/X11/xorg.conf" "/etc/X11/XF86Config"; do
567 nobak_cfg="`expr "${main_cfg}" : '\([^.]*\)'`.vbox.nobak"
568 if test -r "${nobak_cfg}"; then
569 test -r "${main_cfg}" &&
570 if test -n "${legacy}" -o ! "${nobak_cfg}" -ot "${main_cfg}"; then
571 rm -f "${nobak_cfg}" "${main_cfg}"
572 else
573 newer="${newer}`printf " ${main_cfg} (no original)\n"`"
574 fi
575 nobak="true"
576 fi
577 done
578 if test -z "${nobak}"; then
579 for i in $x11conf_files; do
580 if test -r "$i.vbox"; then
581 if test ! "$i" -nt "$i.vbox" -o -n "$legacy"; then
582 mv -f "$i.vbox" "$i"
583 grep -q -E 'vboxvideo|vboxmouse' "$i" &&
584 failed="$failed`printf " $i\n"`"
585 else
586 newer="$newer`printf " $i ($i.vbox)\n"`"
587 fi
588 fi
589 done
590 fi
591 test -n "$newer" && cat << EOF
592
593The following X.Org/XFree86 configuration files were not restored, as they may
594have been changed since they were generated by the VirtualBox Guest Additions.
595You may wish to restore these manually. The file name in brackets is the
596original version.
597
598$newer
599
600EOF
601 test -n "$failed" && cat << EOF
602
603The following X.Org/XFree86 configuration files were restored, but still
604contain references to the Guest Additions drivers. You may wish to check and
605possibly correct the restored configuration files to be sure that the server
606will continue to work after it is restarted.
607
608$failed
609
610EOF
611
612 # Remove X.Org drivers
613 modules_dir=`X -showDefaultModulePath 2>&1` || modules_dir=
614 if [ -z "$modules_dir" ]; then
615 for dir in /usr/lib64/xorg/modules /usr/lib/xorg/modules /usr/X11R6/lib64/modules /usr/X11R6/lib/modules /usr/X11R6/lib/X11/modules; do
616 if [ -d $dir ]; then
617 modules_dir=$dir
618 break
619 fi
620 done
621 fi
622 rm -f "$modules_dir/drivers/vboxvideo_drv"* 2>/dev/null
623 rm -f "$modules_dir/input/vboxmouse_drv"* 2>/dev/null
624
625 # Remove the link to vboxvideo_dri.so
626 for dir in /usr/lib/dri /usr/lib32/dri /usr/lib64/dri \
627 /usr/lib/xorg/modules/dri /usr/lib32/xorg/modules/dri \
628 /usr/lib64/xorg/modules/dri /usr/lib/i386-linux-gnu/dri \
629 /usr/lib/x86_64-linux-gnu/dri; do
630 if [ -d $dir ]; then
631 rm -f "$dir/vboxvideo_dri.so" 2>/dev/null
632 fi
633 done
634
635 # Remove VBoxClient autostart files
636 rm /etc/X11/Xsession.d/98vboxadd-xclient 2>/dev/null
637 rm /etc/X11/xinit.d/98vboxadd-xclient 2>/dev/null
638 rm /etc/X11/xinit/xinitrc.d/98vboxadd-xclient.sh 2>/dev/null
639 rm /etc/xdg/autostart/vboxclient.desktop 2>/dev/null
640 rm /usr/share/autostart/vboxclient.desktop 2>/dev/null
641 rm /usr/bin/VBoxClient-all 2>/dev/null
642
643 # Remove other files
644 rm /usr/share/xserver-xorg/pci/vboxvideo.ids 2>/dev/null
645}
646
647dmnstatus()
648{
649 /bin/true
650}
651
652case "$1" in
653start)
654 start
655 ;;
656stop)
657 stop
658 ;;
659restart)
660 restart
661 ;;
662setup)
663 setup
664 ;;
665cleanup)
666 cleanup
667 ;;
668status)
669 dmnstatus
670 ;;
671*)
672 echo "Usage: $0 {start|stop|restart|status}"
673 exit 1
674esac
675
676exit
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