Remove factor use in jenkins-sudo-grep.sh
Since puppet is gone, just probe for the log files and use which ever
exists.
# the auth.log or secure log files before and after a test run.
PATTERN="sudo.*jenkins.*:.*\(incorrect password attempts\|command not allowed\)"
-case $( facter osfamily ) in
- Debian)
+if [ -f /var/log/auth.log ]; then
OLDLOGFILE=/var/log/auth.log.1
LOGFILE=/var/log/auth.log
- ;;
- RedHat)
+elif [ -f /var/log/secure ]; then
OLDLOGFILE=$( ls /var/log/secure-* | sort | tail -n1 )
LOGFILE=/var/log/secure
- ;;
-esac
+else
+ echo "*** Could not find auth.log/secure log for sudo tracing"
+ exit 1
+fi
case "$1" in
pre)
