mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 14:01:57 -09:00
support/scripts/mkusers: accept user tables without terminating \n
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
6a2b4679ac
commit
5d8445138b
@@ -409,9 +409,8 @@ main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Read in all the file in memory, exclude empty lines and comments
|
# Read in all the file in memory, exclude empty lines and comments
|
||||||
while read -r line; do
|
# mapfile reads all lines, even the last one if it is missing a \n
|
||||||
ENTRIES+=( "${line}" )
|
mapfile -t ENTRIES < <( sed -r -e 's/#.*//; /^[[:space:]]*$/d;' "${USERS_TABLE}" )
|
||||||
done < <( sed -r -e 's/#.*//; /^[[:space:]]*$/d;' "${USERS_TABLE}" )
|
|
||||||
|
|
||||||
# We first create groups whose gid is positive, and then we create groups
|
# We first create groups whose gid is positive, and then we create groups
|
||||||
# whose gid is automatic, so that, if a group is defined both with
|
# whose gid is automatic, so that, if a group is defined both with
|
||||||
|
|||||||
Reference in New Issue
Block a user