56306a468f
In some circumstances, no utmp entry is available, so logname fails. In particular, gnome-terminal no longer creates a utmp entry: https://bugzilla.gnome.org/show_bug.cgi?id=747046 As a workaround, try $SUDO_USER - the use case here is to determine the (unprivileged) user name so we can give them ownership of certain files, so this is usually the right thing to use anyway. If we are not running under sudo, the caller should have passed the username as a parameter to scripts/setup.sh anyway, since we can't reliably determine which user is intended. Also check if username is actually set before using it to run chmod - it is possible that the scripts/setup.sh caller does not want to provide access to an unprivilieged user and just wants to run everything as root. Change-Id: I20631c325b52884a378029dcf38568a2b311b457 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> |
||
---|---|---|
.. | ||
autotest_common.sh | ||
build_kmod.sh | ||
check_format.sh | ||
eofnl | ||
fio.py | ||
genconfig.py | ||
rpc.py | ||
setup.sh |