%pre --erroronfail # Source common functions . /tmp/ks-functions.sh if [ -d /mnt/install/source ]; then srcdir=/mnt/install/source else srcdir=/run/install/repo fi touch /tmp/repo-include if [ -d ${srcdir}/patches ]; then echo "repo --name=updates --baseurl=file://${srcdir}/patches/" > /tmp/repo-include fi %end # Repository arguments from %pre %include /tmp/repo-include %post --erroronfail # Source common functions . /tmp/ks-functions.sh mgmt_dev=none # Persist the boot device to the platform configuration. This will get # overwritten when config_controller is run. echo management_interface=$mgmt_dev >> /etc/platform/platform.conf # persist the default http port number to platform configuration. This # will get overwritten when config_controller is run. echo http_port=8080 >> /etc/platform/platform.conf # Build networking scripts cat << EOF > /etc/sysconfig/network-scripts/ifcfg-lo DEVICE=lo IPADDR=127.0.0.1 NETMASK=255.0.0.0 NETWORK=127.0.0.0 BROADCAST=127.255.255.255 ONBOOT=yes NAME=loopback EOF %end # Note, this section is different and replaced with a wget # if doing the initial install off the network %post --nochroot if [ -d /mnt/install/source ]; then srcdir=/mnt/install/source else srcdir=/run/install/repo fi if [ -d $srcdir/Packages ] ; then mkdir -p /mnt/sysimage/www/pages/feed/rel-xxxPLATFORM_RELEASExxx cp -r $srcdir/Packages /mnt/sysimage/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/Packages cp -r $srcdir/repodata /mnt/sysimage/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/repodata cp $srcdir/*.cfg /mnt/sysimage/www/pages/feed/rel-xxxPLATFORM_RELEASExxx fi if [ -d $srcdir/patches ]; then mkdir -p /mnt/sysimage/www/pages/updates/rel-xxxPLATFORM_RELEASExxx cp -r $srcdir/patches/Packages /mnt/sysimage/www/pages/updates/rel-xxxPLATFORM_RELEASExxx/Packages cp -r $srcdir/patches/repodata /mnt/sysimage/www/pages/updates/rel-xxxPLATFORM_RELEASExxx/repodata mkdir -p /mnt/sysimage/opt/patching cp -r $srcdir/patches/metadata /mnt/sysimage/opt/patching/metadata mkdir -p /mnt/sysimage/opt/patching/packages/xxxPLATFORM_RELEASExxx find /mnt/sysimage/www/pages/updates/rel-xxxPLATFORM_RELEASExxx/Packages -name '*.rpm' \ | xargs --no-run-if-empty -I files cp --preserve=all files /mnt/sysimage/opt/patching/packages/xxxPLATFORM_RELEASExxx/ fi # Create a uuid specific to this installation INSTALL_UUID=`uuidgen` echo $INSTALL_UUID > /mnt/sysimage/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid echo "INSTALL_UUID=$INSTALL_UUID" >> /mnt/sysimage/etc/platform/platform.conf %end