Commit e91827d3 authored by Min RK's avatar Min RK

keep accepting 'yes' for GRANT_SUDO

parent 489bc324
......@@ -27,7 +27,8 @@ if [ $(id -u) == 0 ] ; then
fi
# Enable sudo if requested
if [ "$GRANT_SUDO" == "1" ]; then
if [ "$GRANT_SUDO" == "1" || "$GRANT_SUDO" == 'yes' ]; then
echo "Granting $NB_USER sudo access"
echo "$NB_USER ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/notebook
fi
......@@ -41,7 +42,7 @@ else
if [[ ! -z "$NB_GID" && "$NB_GID" != "$(id -g)" ]]; then
echo 'Container must be run as root to set $NB_GID'
fi
if [[ "$GRANT_SUDO" == "1" ]]; then
if [ "$GRANT_SUDO" == "1" || "$GRANT_SUDO" == 'yes' ]; then
echo 'Container must be run as root to grant sudo permissions'
fi
# Exec the command
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment