metal/bsp-files/kickstarts/post_clone_iso_ks.cfg
Dean Troyer 18922761a6 StarlingX open source release updates
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-05-31 07:36:43 -07:00

42 lines
926 B
INI

# 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