Check sudoers file after editing
"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
This commit is contained in:
parent
8b00250547
commit
1d629ccd46
@ -7,3 +7,4 @@ set -eu
|
||||
set -o pipefail
|
||||
|
||||
sed -i '/secure_path/ s/$/:\/usr\/local\/bin/' /etc/sudoers
|
||||
visudo -c
|
||||
|
Loading…
Reference in New Issue
Block a user