update to 31b795ca71189b326b80666076398f31aea4f2be
[automated-distro-installer] / fai / config / hooks / updatebase.CENTOS
index 6f5813aa7ef4069eabb31af5d70ee3da8b67056d..dd418d885054bb5a37966a7f1542f8dbd04c2bd1 100755 (executable)
@@ -4,11 +4,22 @@ if [ ! -f $target/etc/resolv.conf ]; then
     cp /etc/resolv.conf $target/etc
 fi
 
-if [ "$verbose" ]; then
+if [ X$verbose = X1 ]; then
        echo "Updating base"
-       $ROOTCMD yum -y update 2>&1 | tee -a $LOGDIR/software.log
+       $ROOTCMD yum -y update |& tee -a $LOGDIR/software.log
 else
        $ROOTCMD yum -y update >> $LOGDIR/software.log
 fi
 
+$ROOTCMD systemd-machine-id-setup
+
+cat > $target/etc/sysconfig/kernel <<EOF
+# UPDATEDEFAULT specifies if new-kernel-pkg should make
+# new kernels the default
+UPDATEDEFAULT=yes
+
+# DEFAULTKERNEL specifies the default kernel package type
+DEFAULTKERNEL=kernel-core
+EOF
+
 skiptask updatebase