mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2025-01-09 08:29:50 +00:00
Merge branch 'fix_user_home_search'
This commit is contained in:
commit
72fcc7c2f5
2
src/tomb
2
src/tomb
@ -724,7 +724,7 @@ exec_safe_bind_hooks() {
|
||||
fi
|
||||
local MOUNTPOINT="${1}"
|
||||
local ME=${SUDO_USER:-$(whoami)}
|
||||
local HOME=$(grep $ME /etc/passwd | sed "s/^${ME}:.*:.*:.*:.*:\([\/a-z]*\):.*$/\1/" 2>/dev/null)
|
||||
local HOME=$(awk -v a="$ME" -F ':' '{if ($1 == a) print $6}' /etc/passwd 2>/dev/null)
|
||||
if [ $? -ne 0 ]; then
|
||||
error "how pitiful! A tomb, and no HOME"
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user