mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 08:50:12 +01:00
improved detecting fails and errors.
This commit is contained in:
parent
50c80a2fe6
commit
44c81e2b07
@ -1144,6 +1144,7 @@ exit
|
||||
failcheck(){
|
||||
clear
|
||||
export HOSTNAME
|
||||
myhost=$( hostname | cut -d '.' -f1 )
|
||||
if ! hostname | cut -d '.' -f1
|
||||
then
|
||||
echo "Sorry I am having issues finding your domain.. please type it"
|
||||
@ -1208,6 +1209,7 @@ exit
|
||||
failcheck_yum(){
|
||||
clear
|
||||
export HOSTNAME
|
||||
myhost=$( hostname | cut -d '.' -f1 )
|
||||
if ! hostname | cut -d '.' -f1
|
||||
then
|
||||
echo "Sorry I am having issues finding your domain.. please type it"
|
||||
|
||||
8
tempCodeRunnerFile.sh
Normal file
8
tempCodeRunnerFile.sh
Normal file
@ -0,0 +1,8 @@
|
||||
echo Checking sudoers file.. "${INTRO_TEXT}OK${END}"
|
||||
grouPs=$(grep -i "$myhost" /etc/sudoers.d/sudoers | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g')
|
||||
if [ $grouPs = "$myhost""sudoers" ]
|
||||
then
|
||||
echo Checking sudoers users.. "${INTRO_TEXT}OK${END}"
|
||||
else
|
||||
echo Checking sudoers users.. "${RED_TEXT}FAIL${END}"
|
||||
fi
|
||||
Loading…
x
Reference in New Issue
Block a user