From 1add27c67d4dbe51eeb47151d65d3510f67e1bec Mon Sep 17 00:00:00 2001 From: Tristan PILAT Date: Mon, 25 Mar 2019 17:09:49 +0100 Subject: [PATCH] We don't have to test whether the system is Debian or OpenBSD anymore --- evocheck.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/evocheck.sh b/evocheck.sh index 73d3c10..38ac505 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -328,11 +328,11 @@ fi if [ "$IS_EVOMAINTENANCEUSERS" = 1 ]; then # Can be changed in evocheck.cf homeDir=${homeDir:-/home} - if ! is_debianversion stretch; then - if [ -f /etc/sudoers.d/evolinux ]; then - sudoers="/etc/sudoers.d/evolinux" - else - sudoers="/etc/sudoers" + sudoers="/etc/sudoers" + for i in $( (grep "^User_Alias *ADMIN" $sudoers | cut -d= -f2 | tr -d " "; grep ^sudo /etc/group |cut -d: -f 4) | tr "," "\n" |sort -u); do + grep -qs "^trap.*sudo.*evomaintenance.sh" ${homeDir}/${i}/.*profile + if [ $? != 0 ]; then + failed "IS_EVOMAINTENANCEUSERS" "$i doesn't have evomaintenance trap!" fi for i in $( (grep "^User_Alias *ADMIN" $sudoers | cut -d= -f2 | tr -d " "; grep ^sudo /etc/group |cut -d: -f 4) | tr "," "\n" |sort -u); do grep -qs "^trap.*sudo.*evomaintenance.sh" ${homeDir}/${i}/.*profile