From ad0813af8bb774ad4013622c398ef1f1dc415c06 Mon Sep 17 00:00:00 2001 From: aptalca Date: Tue, 9 Jul 2019 18:55:11 -0400 Subject: [PATCH] grep shouldn't be this confusing --- root/etc/cont-init.d/30-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index 0bb6243..c10cbc3 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -4,7 +4,7 @@ mkdir -p /config/{extensions,data,workspace,.ssh} if [ -n "${SUDO_PASSWORD}" ]; then echo "setting up sudo access" - if [ ! $(grep -c 'abc' /etc/sudoers) ]; then + if ! grep -q 'abc' /etc/sudoers; then echo "adding abc to sudoers" echo "abc ALL=(ALL:ALL) ALL" >> /etc/sudoers fi