Skip to content

Commit ad0813a

Browse files
authored
grep shouldn't be this confusing
1 parent 43281e3 commit ad0813a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

root/etc/cont-init.d/30-config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ mkdir -p /config/{extensions,data,workspace,.ssh}
44

55
if [ -n "${SUDO_PASSWORD}" ]; then
66
echo "setting up sudo access"
7-
if [ ! $(grep -c 'abc' /etc/sudoers) ]; then
7+
if ! grep -q 'abc' /etc/sudoers; then
88
echo "adding abc to sudoers"
99
echo "abc ALL=(ALL:ALL) ALL" >> /etc/sudoers
1010
fi

0 commit comments

Comments
 (0)