From e9aad036ce02d3dd4ceec5735fd9058a52898db7 Mon Sep 17 00:00:00 2001 From: PierreGode Date: Thu, 5 Dec 2019 09:42:22 +0100 Subject: [PATCH] Fixes to CentOS Fixes to CentOS --- ADconnection.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ADconnection.sh b/ADconnection.sh index 3ee5964..34137c6 100755 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -479,7 +479,7 @@ TheOS=$( hostnamectl | grep -i Operating | awk '{print $3}' ) < /dev/null > /dev MintOS=$( hostnamectl | grep -i Operating | awk '{print $4}' ) < /dev/null > /dev/null 2>&1 rasp=$( lsb_release -a | grep -i Distributor | awk '{print $3}' ) < /dev/null > /dev/null 2>&1 kalilinux=$( lsb_release -a | grep -i Distributor | awk '{print $3}' ) < /dev/null > /dev/null 2>&1 - +clear #### OS detection #### if [ "$TheOS" = "Fedora" ] < /dev/null > /dev/null 2>&1 then @@ -1634,8 +1634,6 @@ while [ "$opt" != '' ] ;; 3) clear; echo "Check in Ldap" - - ;; 4) clear; echo "Rejoin to AD" @@ -1657,6 +1655,7 @@ while [ "$opt" != '' ] fi done } + ################# Precheck for YUM based OS ################# PRECHECK_FN(){ ## Precheck sends yum based OS to an own menu ## @@ -1697,7 +1696,7 @@ while test $# -gt 0; do exit 1 fi ;; - -l|--d) + -l|--l) if test $? -gt 0; then DATE=$(date +%H:%M) echo "$DATE" @@ -1707,6 +1706,14 @@ while test $# -gt 0; do exit 1 fi ;; + -f|--f) + if test $? -gt 0; then + answerfile + else + echo "" + exit 1 + fi + ;; -j|--j) if test $# -gt 0; then if ! sudo realm join -v -U "$2" "$3" --install=/