Adjust the grep match pattern to be more specific

https://github.com/debarshiray/toolbox/pull/211

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
This commit is contained in:
Erik Sjölund 2019-07-02 07:34:31 +02:00 committed by Debarshi Ray
parent 0ed441e471
commit 28833fc95b
1 changed files with 1 additions and 1 deletions

View File

@ -1799,7 +1799,7 @@ if [ -f /run/.containerenv ] 2>&3; then
else
echo "$base_toolbox_command: checking if /etc/subgid and /etc/subuid have entries for user $USER" >&3
if ! grep "$USER" /etc/subgid >/dev/null 2>&3 || ! grep "$USER" /etc/subuid >/dev/null 2>&3; then
if ! grep "^$USER:" /etc/subgid >/dev/null 2>&3 || ! grep "^$USER:" /etc/subuid >/dev/null 2>&3; then
echo "$base_toolbox_command: /etc/subgid and /etc/subuid don't have entries for user $USER" >&2
echo "See the podman(1), subgid(5), subuid(5) and usermod(8) manuals for more" >&2
echo "information." >&2