Changeset 36626 in vbox for trunk/src/VBox/Additions/linux
- Timestamp:
- Apr 8, 2011 3:31:31 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/installer/autorun.sh
r36518 r36626 1 1 #!/bin/sh 2 2 # 3 # VirtualBox Guest Additions installation script for Linux3 # VirtualBox Guest Additions installation script for *nix guests 4 4 # 5 5 … … 17 17 18 18 PATH=$PATH:/bin:/sbin:/usr/sbin 19 20 # Deal with differing "which" semantics 21 mywhich() { 22 which "$1" 2>/dev/null | grep -v "no $1" 23 } 24 25 # Get the name and execute switch for a useful terminal emulator 26 # 27 # Sets $gxtpath to the emulator path or empty 28 # Sets $gxttitle to the "title" switch for that emulator 29 # Sets $gxtexec to the "execute" switch for that emulator 30 # May clobber $gtx* 31 # Calls mywhich 32 getxterm() { 33 # gnome-terminal uses -e differently to other emulators 34 for gxti in "gnome-terminal --title -x" "konsole --title -e" "xterm -T -e"; do 35 set $gxti 36 gxtpath="`mywhich $1`" 37 case "$gxtpath" in ?*) 38 gxttitle=$2 39 gxtexec=$3 40 return 41 ;; 42 esac 43 done 44 } 45 46 # Quotes its argument by inserting '\' in front of every character save 47 # for 'A-Za-z0-9/'. Prints the result to stdout. 48 quotify() { 49 echo "$1" | sed -e 's/\([^a-zA-Z0-9/]\)/\\\1/g' 50 } 19 51 20 52 ostype=`uname -s` … … 44 76 "$path/VBoxLinuxAdditions-$arch.run"; do 45 77 if test -f "$i"; then 46 exec /bin/sh "$path/runasroot.sh" \ 47 "VirtualBox Guest Additions installation" "$i" \ 48 "Please try running $i manually." 78 getxterm 79 case "$gxtpath" in ?*) 80 TITLE="VirtualBox Guest Additions installation" 81 TITLE_QUOTED=`quotify "$TITLE"` 82 BINARY=`quotify $i` 83 exec /bin/sh "$path/runasroot.sh" \ 84 "$TITLE" \ 85 "$gxtpath $gxttitle $TITLE_QUOTED $gxtexec $BINARY --xwin" \ 86 "Please try running $i manually." 87 exit 88 ;; 89 esac 49 90 fi 50 91 done
Note:
See TracChangeset
for help on using the changeset viewer.