Commit c82e77f0 authored by Peter Möller's avatar Peter Möller

Fixed erroneous grep (/etc/krb5.conf might not exist and thus generate error)

parent 9161f7c6
......@@ -44,7 +44,7 @@ NbrCPUs=$(egrep "^processor" /proc/cpuinfo | wc -l)
# Kind of memory (ECC='No ECC' or ECC='Multi-bit ECC'):
ECC="$(/usr/sbin/dmidecode -t memory | egrep "Error Correction Type" | sort -u | cut -d: -f2 | sed -e 's/^ //' -e 's/None/No ECC/')"
# What kind of authentication? Ex: Authentication=Lucat
Authentication="$(if [ -n "$(egrep -v "#|^$" /etc/pam.d/common-account 2>/dev/null | egrep pam_krb5.so)" -a -n "$(egrep "default_realm = UW.LU.SE" /etc/krb5.conf)" ]; then echo Lucat; else echo Standalone; fi)"
Authentication="$(if [ -n "$(egrep -v "#|^$" /etc/pam.d/common-account 2>/dev/null | egrep pam_krb5.so)" -a -n "$(egrep "default_realm = UW.LU.SE" /etc/krb5.conf 2>/dev/null)" ]; then echo Lucat; else echo Standalone; fi)"
AuthStr="\"authentication\": \"${Authentication}\"" # Ex: AuthStr='"authentication": "Lucat"'
# Firewall. Ex: Firewall=ufw
Firewall="$(systemctl list-units --type=service --state=active | egrep -i "^\ *(iptables|firewalld|ufw)" | awk '{print $1}' | cut -d\. -f1)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment