VirtualBox

Changeset 24681 in vbox for trunk


Ignore:
Timestamp:
Nov 16, 2009 7:31:55 AM (15 years ago)
Author:
vboxsync
Message:

Solaris/Additions: fix autorun.sh id usage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/installer/autorun.sh

    r21583 r24681  
    7070            subin=`which su`
    7171        else
     72            idbin=/usr/xpg4/bin/id
     73            if test ! -x "$idbin"; then
     74                found=`which id 2> /dev/null`
     75                if test ! -x "$found"; then
     76                    echo "Failed to find a suitable user id executable."
     77                    exit 1
     78                else
     79                    idbin=$found
     80                fi
     81            fi       
     82
    7283            # check if pfexec can get the job done
    73             userid=`$pfexecbin id -u`
     84            if test "$idbin" = "/usr/xpg4/bin/id"; then
     85                userid=`$pfexecbin $idbin -u`
     86            else
     87                userid=`$pfexecbin $idbin | cut -f1 -d'(' | cut -f2 -d'='`
     88            fi
    7489            if test $userid != "0"; then
    7590                # pfexec exists but user has no pfexec privileges, switch to using su and prompting password
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette