mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 16:50:13 +01:00
Update ADconnection.sh
This commit is contained in:
parent
befd55c3fe
commit
d5544ec3c3
@ -404,19 +404,22 @@ linuxclient
|
|||||||
|
|
||||||
################################## Join for linux clients ##########################################
|
################################## Join for linux clients ##########################################
|
||||||
linuxclient(){
|
linuxclient(){
|
||||||
fedoras=$( cat /etc/fedora-release | awk '{print $1}' )
|
fedoras=$( cat /etc/fedora-release | awk '{print $1}' ) < /dev/null > /dev/null 2>&1
|
||||||
Centoss=$( hostnamectl | grep -i Operating | awk '{print $3}' )
|
Centoss=$( hostnamectl | grep -i Operating | awk '{print $3}' )
|
||||||
Debians=$( hostnamectl | grep -i Operating | awk '{print $3}' )
|
Debians=$( hostnamectl | grep -i Operating | awk '{print $3}' )
|
||||||
if [ "$fedoras" = "Fedora" ]
|
if [ "$fedoras" = "Fedora" ]
|
||||||
then
|
then
|
||||||
|
echo "Fedora detected"
|
||||||
Fedora_fn
|
Fedora_fn
|
||||||
else
|
else
|
||||||
if [ "$Centoss" = "CentOS" ]
|
if [ "$Centoss" = "CentOS" ]
|
||||||
then
|
then
|
||||||
|
echo "Cent OS detected"
|
||||||
CentOS
|
CentOS
|
||||||
else
|
else
|
||||||
if [ "$Debians" = "Debian" ]
|
if [ "$Debians" = "Debian" ]
|
||||||
then
|
then
|
||||||
|
echo "Debian detected"
|
||||||
debianclient
|
debianclient
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
@ -442,13 +445,15 @@ kalijoin
|
|||||||
else
|
else
|
||||||
if [ "$fedoras" = "Fedora" ]
|
if [ "$fedoras" = "Fedora" ]
|
||||||
then
|
then
|
||||||
|
echo "Fedora detected"
|
||||||
Fedora_fn
|
Fedora_fn
|
||||||
else
|
else
|
||||||
if [ "$debians" = "Debian" ]
|
if [ "$debians" = "Debian" ]
|
||||||
then
|
then
|
||||||
|
echo "Debian detected"
|
||||||
debianclient
|
debianclient
|
||||||
else
|
else
|
||||||
echo ""
|
echo "Ubuntu detected"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user