diff --git a/tomb b/tomb index a84f938..47283a3 100755 --- a/tomb +++ b/tomb @@ -1828,10 +1828,10 @@ mount_tomb() { tombhost=$(_cat ${tombmount}/.host) tomblast=$(_cat ${tombmount}/.last) tombuid=$(_cat ${tombmount}/.uid | tr -d ' ') - for e in ${(f@)mapfile[/etc/passwd]}; do - [[ "$e" =~ ":$tombuid:" ]] && { - tombuser="${e[(ws@:@)1]}" } - done + + tombuser=$(getent passwd $tombuid) + tombuser=${tombuser[(ws@:@)1]} + _message "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" $tombuser $tombuid $tombtty $tombhost _message "on date ::1 date::" "`date --date=@${tomblast} +%c`" } @@ -1993,10 +1993,9 @@ awk "/mapper/"' { print $2 ";" $3 ";" $4 ";" $5 }'` tombtty=$(_cat ${tombmount}/.tty) tombhost=$(_cat ${tombmount}/.host) tombuid=$(_cat ${tombmount}/.uid | tr -d ' ') - for ee in ${(f@)mapfile[/etc/passwd]}; do - [[ "$ee" =~ ":${tombuid}:" ]] && { - tombuser="${ee[(ws@:@)1]}" } - done + + tombuser=$(getent passwd $tombuid) + tombuser=${tombuser[(ws@:@)1]} } { option_is_set --get-mountpoint } && { print $tombmount; continue }