Skip to content

Commit 0577f50

Browse files
committed
Fix missing brackets for ALLOW_SUDO tests
1 parent 839c9f0 commit 0577f50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

el_configurator.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -886,9 +886,9 @@ echo "ClientAliveCountMax 3" >> /etc/ssh/sshd_config || log "Failed to tune sshd
886886
if [ "${ALLOW_SUDO}" == true ]; then
887887
# Patch sudoers file since noexec is set by default, which prevents sudo
888888
sed -i 's/^Defaults noexec/#Defaults noexec/g' /etc/sudoers 2>> "${LOG_FILE}" || log "Failed to sed /etc/sudoers" "ERROR"
889-
if "${FLAVOR}" = "rhel"; then
889+
if [ "${FLAVOR}" = "rhel" ]; then
890890
dnf install -y sudo 2>> "${LOG_FILE}" || log "Failed to install sudo" "ERROR"
891-
elif "${FLAVOR}" = "debian"; then
891+
elif [ "${FLAVOR}" = "debian" ]; then
892892
apt install -y sudo 2>> "${LOG_FILE}" || log "Failed to install sudo" "ERROR"
893893
chmod 4755 /usr/bin/sudo 2>> "${LOG_FILE}" || log "Failed to chmod /usr/bin/sudo" "ERROR"
894894
fi

0 commit comments

Comments
 (0)