Changeset 36759 in vbox for trunk/src/VBox/Installer
- Timestamp:
- Apr 20, 2011 4:40:13 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 71302
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/runasroot.sh
r36681 r36759 57 57 esac 58 58 59 case "$DISPLAY" in ?*) 60 KDESUDO="`mywhich kdesudo`" 61 case "$KDESUDO" in ?*) 62 eval "`quotify "$KDESUDO"` --comment `quotify "$DESCRIPTION"` -- $COMMAND" 63 exit 59 case "$HAS_TERMINAL" in "") 60 case "$DISPLAY" in ?*) 61 KDESUDO="`mywhich kdesudo`" 62 case "$KDESUDO" in ?*) 63 eval "`quotify "$KDESUDO"` --comment `quotify "$DESCRIPTION"` -- $COMMAND" 64 exit 65 ;; 66 esac 67 68 KDESU="`mywhich kdesu`" 69 case "$KDESU" in ?*) 70 "$KDESU" -c "$COMMAND" 71 exit 72 ;; 73 esac 74 75 GKSU="`mywhich gksu`" 76 case "$GKSU" in ?*) 77 # Older gksu does not grok --description nor '--' and multiple args. 78 # @todo which versions do? 79 # "$GKSU" --description "$DESCRIPTION" -- "$@" 80 # Note that $GKSU_SWITCHES is NOT quoted in the following 81 "$GKSU" $GKSU_SWITCHES "$COMMAND" 82 exit 83 ;; 84 esac 64 85 ;; 65 esac 66 67 GKSU="`mywhich gksu`" 68 case "$GKSU" in ?*) 69 # Older gksu does not grok --description nor '--' and multiple args. 70 # @todo which versions do? 71 # "$GKSU" --description "$DESCRIPTION" -- "$@" 72 # Note that $GKSU_SWITCHES is NOT quoted in the following 73 "$GKSU" $GKSU_SWITCHES "$COMMAND" 74 exit 75 ;; 76 esac 86 esac # $DISPLAY 77 87 ;; 78 esac # $DISPLAY88 esac # ! $HAS_TERMINAL 79 89 80 90 # pkexec may work for ssh console sessions as well if the right agents … … 93 103 94 104 case "$HAS_TERMINAL" in ?*) 105 USE_SUDO= 106 grep Ubuntu /etc/lsb-release && USE_SUDO=true 107 # On Ubuntu we need sudo instead of su. Assume this works, and is only 108 # needed for Ubuntu until proven wrong. 109 case $USE_SUDO in true) 110 SUDO_COMMAND="`quotify "$SUDO"` -- $COMMAND" 111 eval "$SUDO_COMMAND" 112 exit 113 ;; 114 esac 115 95 116 SU="`mywhich su`" 96 117 case "$SU" in ?*)
Note:
See TracChangeset
for help on using the changeset viewer.