diff --git a/create-image.sh b/create-image.sh index 0186ca8..d14a88a 100755 --- a/create-image.sh +++ b/create-image.sh @@ -15,6 +15,13 @@ for COMMAND in "${COMMANDS_TO_CHECK[@]}"; do fi done +if [[ -n "$1" ]]; then + GUSER="^$1" + if ! grep $GUSER /etc/shadow > /dev/null; then + >&2 echo "$0: ERROR: unable to find user '$1'" + fi +fi + function create_new_image { UBOOT_MAX_SIZE='32' IMAGE_SIZE=$(( $(stat -c '%s' "${IMAGE_NAME}") / 1024 / 1024 ))