foreman/extras/jumpstart/dynamic_profile @ 380998ab
6775117c | Ohad Levy | #!/bin/sh
|
|
cd $SI_CONFIG_DIR
|
|||
# Lets setup the DNS with values retrieved from DHCP
|
|||
hostname=`hostname`
|
|||
dnsdomain=`/sbin/dhcpinfo 15`
|
|||
dnsservers=`/sbin/dhcpinfo 6`
|
|||
380998ab | Paul Kelly | arch=`uname -p`
|
|
6775117c | Ohad Levy | echo "domain $dnsdomain" >> /etc/resolv.conf
|
|
for i in $dnsservers
|
|||
do
|
|||
echo "nameserver $i" >> /etc/resolv.conf
|
|||
done
|
|||
perl -p -i -e "s/hosts:.*/hosts: files dns/" /tmp/root/etc/nsswitch.conf
|
|||
1fe671cf | Ohad Levy | # and then download our configuration from foreman
|
|
foreman="foreman"
|
|||
380998ab | Paul Kelly | ./curl.$arch -s http://$foreman/unattended/provision > ${SI_PROFILE}
|
|
6775117c | Ohad Levy | exit 0
|