1d629ccd46
"visudo -c" should be run after the sudoers file has been edited. This will ensure that the file is still syntactically correct, and exit 1 if it isn't. Otherwise, obscure errors can occur later on, and it is difficult to track them back to this script as the source of the error. Change-Id: Id0e5114d72c0779952a0c2c2c06696929c6c8b17
11 lines
163 B
Bash
Executable File
11 lines
163 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
sed -i '/secure_path/ s/$/:\/usr\/local\/bin/' /etc/sudoers
|
|
visudo -c
|