update to 31b795ca71189b326b80666076398f31aea4f2be
[automated-distro-installer] / fai / config / hooks / updatebase.CENTOS
1 #! /bin/bash
2
3 if [ ! -f $target/etc/resolv.conf ]; then
4 cp /etc/resolv.conf $target/etc
5 fi
6
7 if [ X$verbose = X1 ]; then
8 echo "Updating base"
9 $ROOTCMD yum -y update |& tee -a $LOGDIR/software.log
10 else
11 $ROOTCMD yum -y update >> $LOGDIR/software.log
12 fi
13
14 $ROOTCMD systemd-machine-id-setup
15
16 cat > $target/etc/sysconfig/kernel <<EOF
17 # UPDATEDEFAULT specifies if new-kernel-pkg should make
18 # new kernels the default
19 UPDATEDEFAULT=yes
20
21 # DEFAULTKERNEL specifies the default kernel package type
22 DEFAULTKERNEL=kernel-core
23 EOF
24
25 skiptask updatebase