diff options
author | Simon Rettberg | 2021-07-09 15:36:59 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-07-09 15:36:59 +0200 |
commit | 28a2f30f8d0a8ff82f67980baa3345b163a615ff (patch) | |
tree | 77c56c08ee8ab4372d05015bdea9ea6d27f1efb9 /core/includes/useradd.inc | |
parent | [kernel-vanilla] 5.10.48 (diff) | |
download | mltk-28a2f30f8d0a8ff82f67980baa3345b163a615ff.tar.gz mltk-28a2f30f8d0a8ff82f67980baa3345b163a615ff.tar.xz mltk-28a2f30f8d0a8ff82f67980baa3345b163a615ff.zip |
useradd: fix REMOTE_LOCAL_INSTALL check
Diffstat (limited to 'core/includes/useradd.inc')
-rw-r--r-- | core/includes/useradd.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/includes/useradd.inc b/core/includes/useradd.inc index 46b680d8..146e075e 100644 --- a/core/includes/useradd.inc +++ b/core/includes/useradd.inc @@ -101,7 +101,7 @@ add_user() { # In install mode, only work on the system's files directly and do *not* copy to TARGET_BUILD_DIR declare -a _USERADD_OPTS - if [ "$REMOTE_LOCAL_INSTALL" -eq 0 ]; then + if [ -z "$REMOTE_LOCAL_INSTALL" ]; then # regular mltk mode, copy the current user-related files to TARGET_BUILD_DIR local _PASSWD="${TARGET_BUILD_DIR}/etc/passwd" local _GROUP="${TARGET_BUILD_DIR}/etc/group" @@ -158,7 +158,7 @@ add_user() { else _USERADD_OPTS+=("--create-home") # make sure the parent directory exists - if [ "$REMOTE_LOCAL_INSTALL" -eq 0 ]; then + if [ -z "$REMOTE_LOCAL_INSTALL" ]; then _udir="${TARGET_BUILD_DIR}/${USERHOME}" else _udir="$USERHOME" @@ -197,7 +197,7 @@ add_group () { [ $# -lt 1 ] && perror "add_group called without argument." [ -z "${TARGET_BUILD_DIR}" ] && perror "add_group: TARGET_BUILD_DIR not set" declare -a _GROUPADD_OPTS - if [ "$REMOTE_LOCAL_INSTALL" -eq 0 ]; then + if [ -z "$REMOTE_LOCAL_INSTALL" ]; then # regular mltk mode, copy the current user-related files to TARGET_BUILD_DIR local _PASSWD=${TARGET_BUILD_DIR}/etc/passwd local _GROUP=${TARGET_BUILD_DIR}/etc/group |