Fixed checks

This commit is contained in:
Pierre Gode 2019-04-08 09:10:04 +02:00
parent 7392675d95
commit c24b41b003

View File

@ -1318,7 +1318,7 @@ fi
Reauthenticate(){ Reauthenticate(){
export HOSTNAME export HOSTNAME
myhost=$( hostname | cut -d '.' -f1 ) myhost=$( hostname | cut -d '.' -f1 )
whoelse=$( who -ut | grep -v old | awk '{print $1}' ) whoelse=$( who -ut | grep -v old | awk '{print $1}' | head -1 )
homeshome=$( sudo realm list | grep domain-name | awk '{print $2}' ) homeshome=$( sudo realm list | grep domain-name | awk '{print $2}' )
homes=$( find /home/"$homeshome" -maxdepth 1 -mindepth 1 | head -1 | cut -d '/' -f4 ) homes=$( find /home/"$homeshome" -maxdepth 1 -mindepth 1 | head -1 | cut -d '/' -f4 )
if [ "$homes" = "$whoelse" ] if [ "$homes" = "$whoelse" ]