# clone post installation script %post --nochroot if [ -d /mnt/install/source ]; then srcdir=/mnt/install/source else srcdir=/run/install/repo fi if [ -d $srcdir/clone-archive ]; then cp -r $srcdir/clone-archive /mnt/sysimage/ cp $srcdir/install_clone /mnt/sysimage/usr/bin/install_clone chmod 500 /mnt/sysimage/usr/bin/install_clone fi %end # clone post installation script to start install-clone service %post --erroronfail # Build install-clone service file here, so that it is patchable. cat << EOF > /usr/lib/systemd/system/install-clone.service [Unit] Description=Titanium install-clone service After=hostw.service Before=serial-getty@ttyS0.service getty@tty1.service [Service] User=root Type=oneshot RemainAfterExit=yes Environment=PYTHONUNBUFFERED=1 ExecStart=/usr/bin/install_clone StandardOutput=syslog+console [Install] WantedBy=multi-user.target EOF systemctl enable install-clone %end