X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=eclass%2Fsys-user.eclass;h=c328bbd3e5cb2ae1c2b47821f82496a915e6457b;hb=0ac58e53a79a451d36e8c4f39c54a58c7ccee117;hp=37c4d8719ac82cce8bec5a42b3f830c9ed5ba682;hpb=42b11c0d223b3cbdd2a3878375b54bedd66fc46b;p=mjo-overlay.git diff --git a/eclass/sys-user.eclass b/eclass/sys-user.eclass index 37c4d87..c328bbd 100644 --- a/eclass/sys-user.eclass +++ b/eclass/sys-user.eclass @@ -126,7 +126,7 @@ sys-user_modify() { usermod ${SYS_USER_UID:+--uid }"${SYS_USER_UID}" \ ${SYS_USER_GROUPS:+--append --groups }"${SYS_USER_GROUPS}" \ --shell "${SYS_USER_SHELL}" \ - --home-dir "${SYS_USER_HOME}" \ + --home "${SYS_USER_HOME}" \ "${SYS_USER_NAME}" } @@ -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. @@ -268,7 +269,7 @@ sys-user_pkg_prerm() { if [[ -z $(sys-user_getuid "${SYS_USER_NAME}") ]]; then # We have successfully done nothing. ewarn "Tried to remove nonexistent user ${SYS_USER_NAME}." - elif [[ -z "${REPLACING_VERSIONS}" ]]; then + elif [[ -z "${REPLACED_BY_VERSION}" ]]; then # The user to remove exists, and this is not an upgrade. For # Phase 1, we maintain the status quo and simply refuse to # remove him (unless you know what you are doing). @@ -281,7 +282,6 @@ sys-user_pkg_prerm() { fi # The missing case: if the user exists and this is an upgrade, - # we leave the user alone to be modified in - # sys-user_pkg_preinst(). + # we leave him alone to be modified in sys-user_pkg_preinst(). fi }