Changeset 43801 in vbox for trunk/src/VBox/Installer/linux/VBox.sh
- Timestamp:
- Nov 5, 2012 1:33:03 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/VBox.sh
r42119 r43801 78 78 fi 79 79 80 run_in_group() 81 { 82 if id -G -n $(id -u -n) | tr ' ' '\n' | grep -q "vboxusers"; then 83 AWK_SCRIPT='BEGIN { for ( i=1; i < ARGC; i++) {gsub(/'\''/, "'\''\\'\''", ARGV[i]); printf "'\''%s'\'' ", ARGV[i]}}' 84 AWK_SCRIPT="BEGIN { for ( i=1; i < ARGC; i++) {gsub(/'/, \"'\\\\'\", ARGV[i]); printf \"'%s' \", ARGV[i]}}" 85 ARGS="$(awk "$AWK_SCRIPT" "$@")" 86 echo ${ARGS} ";" "exit" | exec newgrp vboxusers 87 else 88 exec "$@" 89 fi 90 } 91 80 92 APP=`basename $0` 81 93 case "$APP" in 82 94 VirtualBox|virtualbox) 83 exec"$INSTALL_DIR/VirtualBox" "$@"95 run_in_group "$INSTALL_DIR/VirtualBox" "$@" 84 96 ;; 85 97 VBoxManage|vboxmanage) 86 exec"$INSTALL_DIR/VBoxManage" "$@"98 run_in_group "$INSTALL_DIR/VBoxManage" "$@" 87 99 ;; 88 100 VBoxSDL|vboxsdl) 89 exec"$INSTALL_DIR/VBoxSDL" "$@"101 run_in_group "$INSTALL_DIR/VBoxSDL" "$@" 90 102 ;; 91 103 VBoxVRDP|VBoxHeadless|vboxheadless) 92 exec"$INSTALL_DIR/VBoxHeadless" "$@"104 run_in_group "$INSTALL_DIR/VBoxHeadless" "$@" 93 105 ;; 94 106 VBoxAutostart|vboxautostart) 95 exec"$INSTALL_DIR/VBoxAutostart" "$@"107 run_in_group "$INSTALL_DIR/VBoxAutostart" "$@" 96 108 ;; 97 109 VBoxBalloonCtrl|vboxballoonctrl) 98 exec"$INSTALL_DIR/VBoxBalloonCtrl" "$@"110 run_in_group "$INSTALL_DIR/VBoxBalloonCtrl" "$@" 99 111 ;; 100 112 vboxwebsrv) 101 exec"$INSTALL_DIR/vboxwebsrv" "$@"113 run_in_group "$INSTALL_DIR/vboxwebsrv" "$@" 102 114 ;; 103 115 VBoxBFE|vboxbfe) 104 exec"$INSTALL_DIR/VBoxBFE" "$@"116 run_in_group "$INSTALL_DIR/VBoxBFE" "$@" 105 117 ;; 106 118 *)
Note:
See TracChangeset
for help on using the changeset viewer.