This should work
This commit is contained in:
parent
f676f9f52e
commit
6c3662a2e2
@ -3,20 +3,14 @@ echo "Setting up template environment"
|
|||||||
echo "Running topgrade"
|
echo "Running topgrade"
|
||||||
/opt/topgrade/topgrade
|
/opt/topgrade/topgrade
|
||||||
|
|
||||||
nssdb_dir="/etc/ipa/nssdb"
|
|
||||||
echo "Checking if Directory $nssdb_dir contains Membership to FreeIPA Realm"
|
echo "Checking if Directory $nssdb_dir contains Membership to FreeIPA Realm"
|
||||||
realm_join=0
|
realm_join=0
|
||||||
if [ -d "$nssdb_dir" ]
|
if [[ -f /var/lib/ipa-client/sysrestore/sysrestore.state ]]
|
||||||
then
|
then
|
||||||
if [ "$(ls -A $nssdb_dir)" ]; then
|
echo "$HOSTNAME appears to not be joined to FreeIPA Server Realm"
|
||||||
echo "Directory $nssdb_dir is not Empty."
|
realm_join=1
|
||||||
realm_join=1
|
|
||||||
echo "ipa-client appears to already be joined to FreeIPA Server Realm"
|
|
||||||
else
|
|
||||||
echo "$nssdb_dir is Empty"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "Directory $nssdb_dir not found."
|
echo "$HOSTNAME appears to already be joined to FreeIPA Server Realm"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $HOSTNAME == *template* ]]; then
|
if [[ $HOSTNAME == *template* ]]; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user