From: Michael Orlitzky Date: Tue, 29 Aug 2017 18:48:39 +0000 (-0400) Subject: sys-user.eclass: fix the "user taken" test. X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mjo-overlay.git;a=commitdiff_plain;h=8da30d4d982f17cb7605a3bb0804b5561acb6e31;ds=sidebyside sys-user.eclass: fix the "user taken" test. --- diff --git a/eclass/sys-user.eclass b/eclass/sys-user.eclass index 37c4d87..8a4c426 100644 --- a/eclass/sys-user.eclass +++ b/eclass/sys-user.eclass @@ -178,7 +178,8 @@ sys-user_src_configure() { fi local current_name=$(sys-user_getname "${SYS_USER_UID}") - if [[ "${current_name}" != "${SYS_USER_NAME}" ]]; then + if [[ -n "${current_name}" ]] && \ + [[ "${current_name}" != "${SYS_USER_NAME}" ]]; then # This UID is already taken by another user, but this # specific UID was not important (we checked in # pkg_pretend), so fall back to an arbitrary one.