#!/bin/bash if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then set -x fi set -eu set -o pipefail # generate ostree in root cd / ostree admin os-init fedora-atomic ostree remote add --set=gpg-verify=false fedora-atomic ${FEDORA_ATOMIC_TREE_URL} ostree pull fedora-atomic ${FEDORA_ATOMIC_TREE_REF} ostree remote delete fedora-atomic ostree admin deploy --os=fedora-atomic ${FEDORA_ATOMIC_TREE_REF} --karg-proc-cmdline --karg=selinux=0 # copy /etc/fstab to the deployed directory SYSROOT=/ostree/deploy/fedora-atomic/deploy/${FEDORA_ATOMIC_TREE_REF}.0 cp /etc/fstab $SYSROOT/etc/ # need to find the generated images DEPLOYED_DIRECTORY=$(find /boot/ostree -name fedora-atomic-* -type d) DEPLOYED_ID=${DEPLOYED_DIRECTORY##*-} INIT_IMAGE=$(find ${DEPLOYED_DIRECTORY} -name initramfs*.img) # generate ostree boot cat > /etc/grub.d/15_ostree < $SYSROOT/etc/sysconfig/docker-storage <