From a148c34c9eea8a524e6e5c60df58a508e76fbb45 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 4 Mar 2019 09:41:21 -0500 Subject: Set secure_path to include toolchain --- scripts/start.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/start.sh b/scripts/start.sh index deab4a2..2a87144 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -95,6 +95,10 @@ if [ $(id -u) == 0 ] ; then echo "$NB_USER ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/notebook fi + # Add toolchain to sudo secure_path + sed -r "s%Defaults\s+secure_path\s+=\s+(.*)%Defaults secure_path=${TOOLCHAIN}/bin:\1%" \ + /etc/sudoers | grep secure_path > /etc/sudoers.d/path + # Exec the command as NB_USER with the PATH and the rest of # the environment preserved run-hooks /usr/local/bin/before-notebook.d -- cgit