From 88d09c973d18a1f1a53e8525bd3a93af161c6642 Mon Sep 17 00:00:00 2001 From: aptalca Date: Tue, 9 Jul 2019 18:32:57 -0400 Subject: [PATCH] fix if grep --- 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 53e2713..0bb6243 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 [ ! $(cat /etc/sudoers | grep abc) ]; then + if [ ! $(grep -c 'abc' /etc/sudoers) ]; then echo "adding abc to sudoers" echo "abc ALL=(ALL:ALL) ALL" >> /etc/sudoers fi