Changeset 46574 in vbox for trunk/src/VBox/Additions/linux/installer
- Timestamp:
- Jun 15, 2013 3:34:01 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/installer/vboxadd-x11.sh
r46563 r46574 302 302 # The driver extension 303 303 driver_ext=".so" 304 # The configuration file we generate if no original was found but we need 305 # one. 306 main_cfg="/etc/X11/xorg.conf" 304 307 305 308 modules_dir=`X -showDefaultModulePath 2>&1` || modules_dir= … … 404 407 ;; 405 408 6.7* | 6.8.* | 4.2.* | 4.3.* ) 406 # Assume X.Org post-fork or XFree86 409 # As the module binaries are the same we use one text for these 410 # four server versions. 407 411 xserver_version="XFree86 4.2/4.3 and X.Org 6.7/6.8" 408 412 driver_ext=.o … … 410 414 vboxmouse_src=vboxmouse_drv.o 411 415 automouse="" 412 autokeyboard="" # Actually not true for 6.8, but it doesn't matter. 416 autokeyboard="" 417 case $x_version in 418 6.8.* ) 419 autokeyboard="true" 420 ;; 421 4.2.* | 4.3.* ) 422 main_cfg="/etc/X11/XF86Config" 423 ;; 424 esac 413 425 ;; 414 426 * ) … … 470 482 # X.Org Server 1.5 and 1.6 can detect hardware they know, but they 471 483 # need a configuration file for VBoxVideo. 472 main_cfg="/etc/X11/xorg.conf" 473 nobak="/etc/X11/xorg.vbox.nobak" 484 nobak_cfg="`expr "${main_cfg}" : '\([^.]*\)'`.vbox.nobak" 474 485 if test -z "$configured"; then 475 486 touch "$main_cfg" 476 487 "$lib_dir/x11config.sh" $autokeyboard $automouse $nopsaux --noBak "$main_cfg" 477 touch "$ nobak"488 touch "${nobak_cfg}" 478 489 fi 479 490 fi … … 542 553 { 543 554 # Restore xorg.conf files as far as possible 544 # #List of generated files which have been changed since we generated them555 # List of generated files which have been changed since we generated them 545 556 newer="" 546 # #Are we dealing with a legacy information which didn't support557 # Are we dealing with a legacy information which didn't support 547 558 # uninstallation? 548 559 legacy="" 549 # #Do any of the restored configuration files still reference our drivers?560 # Do any of the restored configuration files still reference our drivers? 550 561 failed="" 562 # Have we encountered a "nobak" configuration file which means that there 563 # is no original file to restore? 564 nobak="" 551 565 test -r "$CONFIG_DIR/$CONFIG" || legacy="true" 552 main_cfg="/etc/X11/xorg.conf"553 nobak="/etc/X11/xorg.vbox.nobak"554 if test -r "$nobak"; then555 test -r "$main_cfg" &&556 if test -n "$ legacy" -o ! "$nobak" -ot "$main_cfg"; then557 rm -f "$ nobak" "$main_cfg"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}" 558 572 else 559 newer="$ newer`printf " $main_cfg(no original)\n"`"573 newer="${newer}`printf " ${main_cfg} (no original)\n"`" 560 574 fi 561 else 575 nobak="true" 576 fi 577 done 578 if test -n "${nobak}"; then 562 579 for i in $x11conf_files; do 563 580 if test -r "$i.vbox"; then
Note:
See TracChangeset
for help on using the changeset viewer.