base-files: add missing $IPKG_INSTROOT to restorecon call

Update to overlooked v2 version of Dominick Grift's patch.

Fixes: 5109bd164c ("base-files: address sed in-place without SELinux awareness")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 6d7272852e)
This commit is contained in:
Daniel Golle 2022-05-02 19:58:56 +01:00 committed by Tianling Shen
parent bb058fa507
commit c17b66ca94
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -340,7 +340,9 @@ group_add_user() {
[ -n "$(echo $grp | grep ":$")" ] && delim=""
[ -n "$IPKG_INSTROOT" ] || lock /var/lock/passwd
sed -i "s/$grp/$grp$delim$2/g" ${IPKG_INSTROOT}/etc/group
selinuxenabled 2>/dev/null && restorecon /etc/group
if [ -x /usr/sbin/selinuxenabled ] && selinuxenabled; then
selinuxenabled 2>/dev/null && restorecon ${IPKG_INSTROOT}/etc/group
fi
[ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/passwd
}