From 098fd3804996ce09aeeb6ab0f6ce9d37feb6805a Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Mon, 21 Jan 2019 17:15:46 +0200 Subject: [PATCH] mkusers: do not bail out when home dir cannot be created --- support/scripts/mkusers | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/support/scripts/mkusers b/support/scripts/mkusers index e24cb6317b..5368654cc8 100755 --- a/support/scripts/mkusers +++ b/support/scripts/mkusers @@ -364,8 +364,9 @@ add_one_user() { # If the user has a home, chown it # (Note: stdout goes to the fakeroot-script) if [ "${home}" != "-" ]; then - mkdir -p "${TARGET_DIR}/${home}" - printf "chown -h -R %d:%d '%s'\n" "${uid}" "${_gid}" "${TARGET_DIR}/${home}" + if mkdir -p "${TARGET_DIR}/${home}"; then + printf "chown -h -R %d:%d '%s'\n" "${uid}" "${_gid}" "${TARGET_DIR}/${home}" + fi fi }