There already exist static assignment of uid/gid 65533 in packages feed
and we have nobody/nogroup taking 65534 as their ids. Let's change the
pid of dynamic assignment to start from 65536 so that the two assignment
scheme will not collide with each other
While at it, fix the scan command checking existence of uid/gid
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
include $(INCLUDE_DIR)/version.mk
PKG_NAME:=base-files
include $(INCLUDE_DIR)/version.mk
PKG_NAME:=base-files
PKG_FLAGS:=nonshared
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
PKG_FLAGS:=nonshared
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
gid=$(grep -s "^${1}:" ${IPKG_INSTROOT}/etc/group | cut -d: -f3)
[ -n "$gid" ] && return $gid
gids=$(cat ${IPKG_INSTROOT}/etc/group | cut -d: -f3)
gid=$(grep -s "^${1}:" ${IPKG_INSTROOT}/etc/group | cut -d: -f3)
[ -n "$gid" ] && return $gid
gids=$(cat ${IPKG_INSTROOT}/etc/group | cut -d: -f3)
- gid=100
- while [ -n "$(echo $gids | grep $gid)" ] ; do
+ gid=65536
+ while [ -n "$(echo "$gids" | grep "^$gid$")" ] ; do
gid=$((gid + 1))
done
group_add $1 $gid
gid=$((gid + 1))
done
group_add $1 $gid
local rc
[ -z "$uid" ] && {
uids=$(cat ${IPKG_INSTROOT}/etc/passwd | cut -d: -f3)
local rc
[ -z "$uid" ] && {
uids=$(cat ${IPKG_INSTROOT}/etc/passwd | cut -d: -f3)
- uid=100
- while [ -n "$(echo $uids | grep $uid)" ] ; do
+ uid=65536
+ while [ -n "$(echo "$uids" | grep "^$uid$")" ] ; do