1 ##################################################
2 # BEGIN basic-postinstall.sh
4 [ "@@WEBPROXY@@" = "" ] || {
5 http_proxy=@@WEBPROXY@@
9 echo "Using web proxy: \$http_proxy"
11 # Force up the network, as kickstart may not have started it. Modern
12 # RHEL/Fedora renames network interfaces to "well-known" names that
13 # are hard to know in this script. So find the 1st ethernet interface
15 rm -f /etc/sysconfig/network-scripts/ifcfg-eth*
16 rm -f /etc/sysconfig/network-scripts/ifcfg-en*
19 awk '/^[[:digit:]]/ { dev=gensub(/:/, "", "", $2) } \\
20 /^[[:space:]]*link\\/ether/ { print dev ; exit}')
21 echo "Forcing up network interface \"$dev\""
24 ip addr add @@INSTALL_IP@@ dev $dev
25 if [ -n "@@INSTALL_GW@@" ] ; then
26 ip route add default via @@INSTALL_GW@@
31 cat << EOF > /etc/resolv.conf
34 nameserver @@NAMESERVER@@
37 echo "Setting up YUM repositories"
39 cat << EOF > /etc/yum.repos.d/autocluster.repo
43 # CentOS has some weird plugins that slow thing down
44 echo "Switching off YUM plugins"
46 sed -i -e 's@^plugins=1@plugins=0@' /etc/yum.conf
48 echo "Updating from YUM repositories"
51 # Leave things in a state that forces any nodes based on this base
52 # image fetch all of the repo data next time an update is done.
55 # This stops NICs with fake MAC addresses being carried forward from
57 rm -f /etc/udev/rules.d/70-persistent-net.rules
61 # END basic-postinstall.sh
62 ##################################################