diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-01-16 20:43:56 -0800 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-01-17 12:17:36 +0100 |
commit | b8e17aefea91632a70634aa2828a8b548c2b2567 (patch) | |
tree | b6af048bde0eb16a49e432a201df4ac852bce2d6 /package/base-files/files/lib | |
parent | cba5fa0352869c117858bd56bebf3c1290865d99 (diff) | |
download | upstream-b8e17aefea91632a70634aa2828a8b548c2b2567.tar.gz upstream-b8e17aefea91632a70634aa2828a8b548c2b2567.tar.bz2 upstream-b8e17aefea91632a70634aa2828a8b548c2b2567.zip |
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>
Diffstat (limited to 'package/base-files/files/lib')
-rwxr-xr-x | package/base-files/files/lib/functions.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index b118c8368c..40a7527aa5 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -324,7 +324,7 @@ group_add_next() { echo $gid return fi - gids=$(cat ${IPKG_INSTROOT}/etc/group | cut -d: -f3) + gids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/group) gid=65536 while [ -n "$(echo "$gids" | grep "^$gid$")" ] ; do gid=$((gid + 1)) @@ -352,7 +352,7 @@ user_add() { local shell="${6:-/bin/false}" local rc [ -z "$uid" ] && { - uids=$(cat ${IPKG_INSTROOT}/etc/passwd | cut -d: -f3) + uids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/passwd) uid=65536 while [ -n "$(echo "$uids" | grep "^$uid$")" ] ; do uid=$((uid + 1)) |