Configure YUM plugins off in basic postinstall
[autocluster.git] / templates / basic-postinstall.sh
1 # install the SoFS packages via a proxy on the host
2 [ "@@WEBPROXY@@" = "" ] || {
3   http_proxy=@@WEBPROXY@@
4   export http_proxy
5 }
6
7 echo "Using web proxy: \$http_proxy"
8
9 # force up the network, as kickstart may not have started it
10 /sbin/ifconfig eth0 @@IPBASE@@.@@IPNET0@@.@@FIRSTIP@@ up
11 /sbin/route add default gw @@GATEWAY@@
12 /sbin/ifconfig -a
13 /sbin/route -n
14
15
16 cat << EOF > /etc/resolv.conf
17 domain @@DOMAIN@@
18 search @@DNSSEARCH@@
19 nameserver @@NAMESERVER@@
20 EOF
21
22 echo "Setting up YUM repositories" 
23
24 cat << EOF > /etc/yum.repos.d/autocluster.repo
25 @@@YUM_TEMPLATE@@@
26 EOF
27
28 # CentOS has some weird plugins that slow thing down
29 echo "Switching off YUM plugins"
30
31 sed -i -e 's@^plugins=1@plugins=0@' /etc/yum.conf
32
33 echo "Updating from YUM repositories"
34 yum clean all
35 yum -y update
36 # Leave things in a state that forces any nodes based on this base
37 # image fetch all of the repo data next time an update is done.
38 yum clean all
39
40 rm -f /etc/udev/rules.d/70-persistent-net.rules
41
42 sync