nick soph's picture

Hi 

Trying to get the following command setup so it will boot once on next reboot, 

           /usr/lib/inithooks/firstboot.d/15regen-sslcert

The command recreates the SSL certificate.

Couple of questions 

1. where do I put the command/have to do so it will run only once?

2. Is there anything else that needs to be done to the machine to prevent confusion with other machines on the network (dhcp is enabled)?

Thanks

nicksoph

 

Forum: 
Jeremy Davis's picture

If you look at the docs then you can see that you can make the scripts in /usr/lib/inithooks/firstboot.d/ run on next reboot by resetting the RUN_FIRSTBOOT flag in /etc/default/inithooks . However that will make all of the scripts run. If that is a problem then the options you have are to either move the other scripts out of firstboot.d or preseed the answers to the info required by the other scripts to make them non-interactive (see further down on that wiki page linked to above)

I'm not sure what you mean by "prevent confusion with other machines on the network"? As long as the DHCP IP range does not conflict with any static IPs then it should be ok in that regard (DHCP will only give out each IP once per session). If that's what you meant...?

nicksoph's picture

Hi Jeremy

Thakns hadnt :-( but shall look at the docs.

Just wanted to check there was nothing else to change to ensure the machines didnt use the same credentials for anything. From your answer I think not.

Thank you again for the help you have given me on this site, it is most appreciated. Much karma due.

Best wishes

nicksoph 

Jeremy Davis's picture

If you just reset the RUN_FIRSTBOOT flag in /etc/default/inithooks then all the firstboot scripts will run, just like they do on first boot! :)

Add new comment