Skip to content

Commit

Permalink
Merge branch 'fix_user_home_search'
Browse files Browse the repository at this point in the history
  • Loading branch information
jaromil committed Oct 26, 2011
2 parents 5d54a3b + e7e71aa commit 72fcc7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tomb
Expand Up @@ -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
Expand Down

0 comments on commit 72fcc7c

Please sign in to comment.