Skip to content

Commit

Permalink
base-files: add missing $IPKG_INSTROOT to restorecon call
Browse files Browse the repository at this point in the history
Update to overlooked v2 version of Dominick Grift's patch.

Fixes: 5109bd1 ("base-files: address sed in-place without SELinux awareness")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  • Loading branch information
dangowrt committed May 2, 2022
1 parent 0276fab commit 6d72728
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package/base-files/files/lib/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,9 @@ group_add_user() {
echo "$grp" | grep -q ":$" && 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
}

Expand Down

0 comments on commit 6d72728

Please sign in to comment.