I have a custom Ubuntu Server ISO that answers installation questions via preseed and kickstart files. It also installs additional .debs I've placed on the ISO during the actual installation as well. This all works fine.
Now I need a way for a script to run on the first boot up for configuration needs. The post install script does not seem to be working (in the kickstart file). I'm reduced to using systemd or the rc.local file (at least I think those are my only options...).
Which one is easiest for simply kicking off a script that will already live on the ISO with absolutely no hands on the keyboard? Systemd seems to need me to enable the service first which is not acceptable (again, no hands on keyboard). I'm leaning towards rc.local but this post says not to use it: "Purpose and typical usage of /etc/rc.local".
Should I ignore that warning? Wondering if there are simpler ways as well.
@reboot
cron job might also do the trick, assuming cron is running and such. – thrig Mar 23 '16 at 22:01/etc/rc.local
you can put a service file in/etc/systemd/system/multi-user.target.wants/
... – jasonwryan Mar 24 '16 at 21:30