5e957f6350
Sometimes the secure_path option value in /etc/sudoers is surrounded by quotes, in this case the current command creates an invalid entry and it's not possible to sudo anymore. This fix adjust the sed command to deal with possible quotes Change-Id: Ifd6f9e29b3c0d04d6f65d3f55524ad202fb3294e
10 lines
179 B
Bash
Executable file
10 lines
179 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
sed -i -e "/secure_path/ s@\([\'\"]\?\)\$@:/usr/local/bin/\1@" /etc/sudoers
|
|
visudo -c
|