Change cmds count to always be right.

This commit is contained in:
Jeff Eberl 2019-11-30 15:08:16 -07:00 committed by GitHub
parent 73651d2b87
commit 03a0c5d2f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -327,7 +327,7 @@ function patch_system_files() {
)
# Check if sudoers needs patching
if [ $(sudo grep -c $raspap_user /etc/sudoers) -ne 28 ]
if [ $(sudo grep -c $raspap_user /etc/sudoers) -ne ${#cmds[@]} ]
then
# Sudoers file has incorrect number of commands. Wiping them out.
install_log "Cleaning system sudoers file"