Created
June 30, 2016 20:29
-
-
Save sierra-tango-echo/a97e10af33d9ac6bb2145c1bbdb6386d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CLIENTNAME=login1 | |
CLUSTER=cluster2 | |
CLIENTIP=10.75.0.51 | |
ONETIMEPASS=moose | |
DOMAIN=flighty.alces.network | |
REALM=`echo $DOMAIN | sed -e 's/\(.*\)/\U\1/'` | |
DIRECTORY_IP=10.75.0.161 | |
#STOP DHCP CHANGING RESOLV.CONF ON REBOOTS | |
sed -i -e "s/^PEERDNS.*$/PEERDNS=\"no\"/g" /etc/sysconfig/network-scripts/ifcfg-eth0 | |
#PREP RESOLVE.CONF | |
echo -e "search $CLUSTER.$DOMAIN $DOMAIN\nnameserver $DIRECTORY_IP" > /etc/resolv.conf | |
yum -y install ipa-client ipa-admintools | |
echo ipa-client-install --no-ntp --mkhomedir --force-join --realm="$REALM" --server="${DIRECTORY_IP}" -w "$ONETIMEPASS" --domain="${CLUSTER}.${DOMAIN}" --unattended |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment