- Timestamp:
- Dec 10, 2012 2:35:34 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 82592
- Location:
- trunk/src/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/Makefile.kmk
r44075 r44080 126 126 127 127 VBOX_ADD_STRIP_SBIN += \ 128 VBoxService 128 VBoxService \ 129 $(if $(VBOX_WITH_LIGHTDM_GREETER),vbox-greeter) 129 130 130 131 VBOX_ADD_STRIP_LIB += \ … … 336 337 $(QUIET)$(CP) -RPf -- $< $@ 337 338 338 339 339 INSTALLS += GuestDrivers-src 340 340 GuestDrivers-src_INST = $(INST_ADDITIONS)src/ … … 358 358 $(VBOX_REL_X11_ADD_INST)vboxvideo.ids \ 359 359 selinux-fedora/vbox_x11.pp \ 360 selinux-fedora/vbox_accel.pp 360 selinux-fedora/vbox_accel.pp \ 361 $(if $(VBOX_WITH_LIGHTDM_GREETER),lightdm-greeter/vbox-greeter.desktop) 361 362 362 363 INSTALLS += lnx_add_inst-license -
trunk/src/VBox/Additions/linux/installer/deffiles
r41586 r44080 26 26 /usr/bin/VBoxClient \ 27 27 /usr/bin/VBoxControl \ 28 /usr/sbin/vbox-greeter \ 28 29 /usr/sbin/vboxadd-timesync \ 29 30 /usr/sbin/vboxadd-service \ … … 44 45 /usr/lib/VBoxOGL.so \ 45 46 /usr/lib64/VBoxOGL.so \ 47 /usr/share/xgreeters/vbox-greeter.desktop \ 46 48 /etc/X11/Xsession.d/98vboxadd-xclient \ 47 49 /etc/X11/xinit.d/98vboxadd-xclient \ -
trunk/src/VBox/Installer/linux/routines.sh
r38924 r44080 621 621 return 0 622 622 } 623 624 install_autologon() { 625 info "Installing auto-logon support ..." 626 627 ## Parameters: 628 # Greeter directory. Defaults to /usr/share/xgreeters. 629 greeter_dir="$1" 630 # LightDM config. Defaults to /etc/lightdm/lightdm.conf. 631 lightdm_config="$2" 632 # Whether to force installation if non-compatible distribution 633 # is detected. 634 force="$3" 635 636 # Check for Ubuntu and derivates. @todo Debian? 637 distros="Ubuntu UbuntuStudio Edubuntu Kubuntu Lubuntu Mythbuntu Xubuntu" 638 ## @todo Map Linux Mint versions to Ubuntu ones. 639 640 ## @todo Move the distro check to a routine / globals as soon as 641 ## we have other distribution-dependent stuff. 642 which lsb_release &>/dev/null 643 if test "$?" -ne "0"; then 644 info "Error: lsb_release not found (path set?), skipping auto-logon installation" 645 return 1 646 fi 647 distro_name=$(lsb_release -si) 648 distro_ver=$(lsb_release -sr) 649 650 for distro_cur in ${distros}; do 651 if test "$distro_name" = "$distro_cur"; then 652 distro_found="true" 653 break 654 fi 655 done 656 657 if test -z "$distro_found"; then 658 if ! test "$force" = "force"; then 659 info "Error: Unsupported distribution \"$distro_name\" found, skipping auto-logon installation" 660 return 1 661 fi 662 info "Warning: Unsupported distribution \"$distro_name\" found" 663 else 664 # Do we have Ubuntu 11.10 or greater? 665 # Use AWK for comparison since we run on plan sh. 666 echo | awk 'END { exit ( !('"$distro_ver >= 11.10"') ); }' 667 if test "$?" -ne "0"; then 668 if ! test "$force" = "force"; then 669 info "Error: Version $distro_ver of \"$distro_name\" not supported, skipping auto-logon installation" 670 return 1 671 fi 672 info "Warning: Unsupported \"$distro_name\" version $distro_ver found" 673 fi 674 fi 675 676 # Install dependencies (lightdm and FLTK 1.3+) using apt-get. 677 which apt-get &>/dev/null 678 if test "$?" -ne "0"; then 679 info "Error: apt-get not found (path set?), skipping auto-logon installation" 680 return 1 681 fi 682 info "Checking and installing necessary dependencies ..." 683 apt-get -qqq -y install libfltk1.3 libfltk-images1.3 || return 1 684 apt-get -qqq -y install lightdm || return 1 685 686 # Check for LightDM config. 687 if ! test -f "$lightdm_config"; then 688 info "Error: LightDM config \"$lightdm_config\" not found (LightDM installed?), skipping auto-logon installation" 689 return 1 690 fi 691 692 # Check for /usr/share/xgreeters. 693 if ! test -d "$greeter_dir"; then 694 if ! test "$force" = "force"; then 695 info "Error: Directory \"$greeter_dir\" does not exist, skipping auto-logon installation" 696 return 1 697 fi 698 info "Warning: Directory \"$greeter_dir\" does not exist, creating it" 699 mkdir -p -m 755 "$greeter_dir" || return 1 700 fi 701 702 # Link to required greeter files into $greeter_dir. 703 add_symlink "$INSTALLATION_DIR/share/VBoxGuestAdditions/vbox-greeter.desktop" "$greeter_dir/vbox-greeter.desktop" 704 705 # Backup and activate greeter config. 706 if ! test -f "$lightdm_config.vbox-backup"; then 707 info "Backing up LightDM configuration file ..." 708 cp "$lightdm_config" "$lightdm_config.vbox-backup" || return 1 709 chmod 644 "$lightdm_config.vbox-backup" || return 1 710 fi 711 sed -i -e 's/^\s*greeter-session\s*=/greeter-sessio**n=vbox-greeter/g' "$lightdm_config" || return 1 712 chmod 644 "$lightdm_config" || return 1 713 714 info "Auto-logon installation successful" 715 return 0 716 } 717 718 remove_autologon() { 719 if test -z "$LIGHTDM_CONFIG"; then 720 return 0 721 fi 722 info "Un-installing auto-logon support ..." 723 724 # Switch back to original greeter. 725 if test -f "$LIGHTDM_CONFIG.vbox-backup"; then 726 mv "$LIGHTDM_CONFIG.vbox-backup" "$LIGHTDM_CONFIG" 727 if test "$?" -ne "0"; then 728 info "Warning: Could not restore original LightDM config \"$LIGHTDM_CONFIG\"" 729 fi 730 fi 731 732 # Remove greeter directory (if not empty). 733 rm "$LIGHTDM_GREETER_DIR" 2>/dev/null 734 735 return 0 736 } 737 -
trunk/src/VBox/Installer/linux/run-inst.sh
r40573 r44080 2 2 # 3 3 # Oracle VM VirtualBox 4 # VirtualBox Makeself installation starter script for Linux 4 # VirtualBox Makeself installation starter script 5 # for Linux Guest Additions 5 6 6 7 # 7 # Copyright (C) 2006-20 09Oracle Corporation8 # Copyright (C) 2006-2012 Oracle Corporation 8 9 # 9 10 # This file is part of VirtualBox Open Source Edition (OSE), as … … 21 22 # installation script. 22 23 # 23 24 24 PATH=$PATH:/bin:/sbin:/usr/sbin 25 25 … … 43 43 LOGFILE="/var/log/$PACKAGE.log" 44 44 45 INSTALLATION_LIGHTDM_CONFIG="/etc/lightdm/lightdm.conf" 46 INSTALLATION_LIGHTDM_GREETER_DIR="/usr/share/xgreeters" 47 45 48 . "./$ROUTINES" 46 49 … … 49 52 create_log "$LOGFILE" 50 53 54 ## @todo r=andy: Explain options like "force" and "no_setup" -- not self-explanatory 55 # to the user. 51 56 usage() 52 57 { 53 58 info "" 54 info "Usage: install [<installation directory>] | uninstall [force] [no_setup]" 59 info "Usage: $SELF install [<installation directory>] [--with-autologon] |" 60 info " uninstall" 61 info " [--force] [--no-setup]" 55 62 info "" 56 63 info "Example:" … … 146 153 done 147 154 155 remove_autologon 156 148 157 # Get rid of any remaining files 149 158 for i in $DEFAULT_FILE_NAMES; do … … 192 201 # Sensible default actions 193 202 ACTION="install" 203 WITH_AUTOLOGON="" 194 204 DO_SETUP="true" 195 205 NO_CLEANUP="" … … 210 220 ;; 211 221 212 force) 222 --lightdm-config) 223 INSTALLATION_LIGHTDM_CONFIG="$2" 224 shift 225 ;; 226 227 --lightdm-greeter-dir) 228 INSTALLATION_LIGHTDM_GREETER_DIR="$2" 229 shift 230 ;; 231 232 --with-autologon) 233 WITH_AUTOLOGON="true" 234 ;; 235 236 --force) 237 force) # Keep for backwards compatibility. 213 238 FORCE_UPGRADE="force" 214 239 ;; 215 no_setup) 240 241 --no-setup) 242 no_setup) # Keep for backwards compatibility. 216 243 DO_SETUP="" 217 244 ;; 218 no_cleanup) 245 246 --no-cleanup) 247 no_cleanup) # Keep for backwards compatibility. 219 248 # Do not do cleanup of old modules when removing them. For 220 249 # testing purposes only. … … 222 251 NO_CLEANUP="no_cleanup" 223 252 ;; 253 224 254 *) 225 255 if [ "`echo $1|cut -c1`" != "/" ]; then … … 292 322 BUILD_TYPE='$BUILD_TYPE' 293 323 USERNAME='$USERNAME' 324 # LightDM greeter configuration 325 LIGHTDM_CONFIG='$INSTALLATION_LIGHTDM_CONFIG' 326 LIGHTDM_GREETER_DIR='$INSTALLATION_LIGHTDM_GREETER_DIR' 294 327 EOF 295 328 … … 356 389 esac 357 390 done 391 392 # Load configuration values 393 test -r "$CONFIG_DIR/$CONFIG" && . "$CONFIG_DIR/$CONFIG" 394 395 # Remove auto-logon support 396 remove_autologon 397 398 # Remove configuration files 358 399 rm "$CONFIG_DIR/$CONFIG_FILES" 2>/dev/null 359 400 rm "$CONFIG_DIR/$CONFIG" 2>/dev/null … … 365 406 test -n "$REMOVE_INSTALLATION_DIR" && 366 407 echo "$INSTALLATION_DIR/" >> "$CONFIG_DIR/$CONFIG_FILES" 408 409 # Install auto-logon support. 410 if test -n "$WITH_AUTOLOGON"; then 411 ## @todo Make parameters configurable thru command line. 412 install_autologon "$INSTALLATION_LIGHTDM_GREETER_DIR" "$INSTALLATION_LIGHTDM_CONFIG" "$FORCE_UPGRADE" 413 fi 414
Note:
See TracChangeset
for help on using the changeset viewer.