base-files/functions.sh: remove useless cat
The cut command can take a file as an input. https://github.com/koalaman/shellcheck/wiki/SC2002 Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
cba5fa0352
commit
b8e17aefea
1 changed files with 2 additions and 2 deletions
|
@ -324,7 +324,7 @@ group_add_next() {
|
||||||
echo $gid
|
echo $gid
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
gids=$(cat ${IPKG_INSTROOT}/etc/group | cut -d: -f3)
|
gids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/group)
|
||||||
gid=65536
|
gid=65536
|
||||||
while [ -n "$(echo "$gids" | grep "^$gid$")" ] ; do
|
while [ -n "$(echo "$gids" | grep "^$gid$")" ] ; do
|
||||||
gid=$((gid + 1))
|
gid=$((gid + 1))
|
||||||
|
@ -352,7 +352,7 @@ user_add() {
|
||||||
local shell="${6:-/bin/false}"
|
local shell="${6:-/bin/false}"
|
||||||
local rc
|
local rc
|
||||||
[ -z "$uid" ] && {
|
[ -z "$uid" ] && {
|
||||||
uids=$(cat ${IPKG_INSTROOT}/etc/passwd | cut -d: -f3)
|
uids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/passwd)
|
||||||
uid=65536
|
uid=65536
|
||||||
while [ -n "$(echo "$uids" | grep "^$uid$")" ] ; do
|
while [ -n "$(echo "$uids" | grep "^$uid$")" ] ; do
|
||||||
uid=$((uid + 1))
|
uid=$((uid + 1))
|
||||||
|
|
Loading…
Reference in a new issue