mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 23:21:17 +02:00
fix(make_chroot): Don't fail if user's full name is blank.
It is perfectly valid for the comment field in a passwd file to be blank so don't treat that as an error. Sorry backjlack :-/
This commit is contained in:
parent
309e247b9a
commit
607c4b1cd5
@ -147,7 +147,6 @@ init_users () {
|
||||
info "Adding user ${SUDO_USER}..."
|
||||
local full_name group_name
|
||||
full_name=$(getent passwd "${SUDO_USER}" | cut -d: -f5)
|
||||
[[ -n "${full_name}" ]] || die "Looking up user $SUDO_USER failed."
|
||||
group_name=$(getent group "${SUDO_GID}" | cut -d: -f1)
|
||||
[[ -n "${group_name}" ]] || die "Looking up gid $SUDO_GID failed."
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user