script to execute after reboot

John G Heim jheim at math.wisc.edu
Tue Mar 14 15:21:08 CET 2017


What I do is to run an fai softupdate via a line in cron upon reboot.

@REBOOT root fai --class=POSTINSTALL softupdate

Kind of nice to do an FAI softupdate after every reboot -- especially 
the 1st one after the initial install. Over the years, I've moved more 
and more stuff into the post install softupdate. This has 2 benefits. 
First, the initial install takes only 5 to 10 minutes. Secondly, I can 
almost do a normal install from a CD and do the softupdate and get the 
same results as if I did a fai install in the first place.
So essentially what I am suggesting is that you run your script after 
every reboot, not just the first one. It can be very convenient to have 
a script that is run after each reboot. Personally, I update that script 
via an fai softupdate. In other words, the softupdate is updating the 
next softupdate. That can get tricky. Make a mistake and the softupdates 
come to a screeching halt. Then you have to figure out some way to copy 
a repaired script to all your fai machines. I did that once or twice 
early on but now I haven't messed it up in years.




On 03/14/2017 07:49 AM, Jan.Dreyer at bertelsmann.de wrote:
> Hi,
>
> I have a script with some commands that should be executed on first reboot after installation only. Now I could put a call to it into rc.local and delete it afterwards, but I’m sure I have seen a more elegant solution directly with FAI. Could someone point my nose to the right direction?
>
> Thanks in advance,
> Jan Dreyer
>


More information about the linux-fai mailing list