[PATCH 1/3] base-files: sysupgrade: add tar.sh with helpers for building archives

Eric evil.function at proton.me
Tue Feb 27 15:46:14 PST 2024


On Tuesday, February 27th, 2024 at 13:41, Jo-Philipp Wich <jo at mein.io> wrote:
> I think the uid and gid values should correspond to the given username
> and groupname values. Something like this would probably work:
> 
> local uid=$(id -u "$username")
> local gid=$(sed -rne "s#^$groupname:[^:]:([0-9]+):.\$#\1#p" /etc/group)

Does this do the same thing?

local gid=$(uid -g "$groupname")

Eric



More information about the openwrt-devel mailing list