base-files: fix getting gid from group_add_next
authorYousong Zhou <yszhou4tech@gmail.com>
Thu, 9 Nov 2017 09:29:56 +0000 (17:29 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Thu, 9 Nov 2017 09:42:36 +0000 (17:42 +0800)
commitb2aa820b48add74b97e0eab993ede648c43e85db
treecc81c5e726d0f63d8ee1b8ae5fb292e0e1773908
parenta6e9d146f2bf1434f6645e72a7dc99166b5021fb
base-files: fix getting gid from group_add_next

Shell function return code only has range [0, 255].  Other values will
be truncated, e.g. return 65536 will have the same effect as return 0

While at it, drop other "return $rc" where rc will almost always take
value 0 and whose value current callers actually do not check

Fixes FS#988

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
package/base-files/Makefile
package/base-files/files/lib/functions.sh