I am doing some server provisioning and I need to run a script AFTER installation as it requires the system to be fully functional, include services. So I cannot put it inside the
%post section of my kickstart file.
Instead I have created a systemd service which disables itself as the last thing it does.
[Unit] Description=Prepare the system after installation [Service] Type=oneshot ExecStart=/usr/bin/prepare-system [Install] WantedBy=multi-user.target
The problem is that during the first boot, I get to the login prompt and can even login and start using the system, while the "first boot script" is still running.
This gives the Administrator setting up the system the illusion that the system is finished, when it's really not.
I would instead want the service to delay the booting, preferably showing a message like "The system is being prepared, please wait..." and wait there until the script is finished.