[OmniOS-discuss] initialboot

Al Slater al.slater at scluk.com
Mon Jul 31 21:24:57 UTC 2017


Hi,

Sorry, I clearly didn't explain well enough.

Normally, initial-boot is enabled in the iso/kayak image that is
installed.  When it is started on the first boot it runs /.initialboot
and then disables itself.

I was thinking that if there was some way to "re-enable" initial-boot,
then I could drop a /.initialboot script, re-enable initial-boot and
then shutdown before creating new AMI, such that when an instance based
upon the new AMI was launched, it would run .initialboot.

The problem is, enabling initial-boot immediately runs the .initialboot
script and then disables itself.  So, I hoped there was a way to enable
the service such that it did not immediately enable, but was enabled so
it would start after the next reboot.

Al

On 31/07/17 21:49, PÁSZTOR György wrote:
> Hi,
> 
> I hope you don't mind, but I started a new thread with this, since it seems
> a completly new topic.
> 
> "Al Slater" <al.slater at scluk.com> írta 2017-07-31 21:05-kor:
>> One more question though, is there any way to enable an SMF service for
>> the next reboot, but not immediately.  Specifically, I want to enable
>> the initial-boot service with a .initialboot file in place, then create
>> a new AMI.
> 
> I don't completely understand. You want to enable initialboot after the
> boot was complete, and only after a certain amount of time?
> I'm not sure, what this initialboot exactly does, but it seems not a simple
> service, it's a milestone. Maybe, I would not mess with it.
> Otherwise, if I need a delay between the service and the boot, and it's
> important to remain "disabled" while it's not enabled:
> Create an @reboot cronjob. I don't remember which cron implementation is
> the default. On linux's vixie's cron the time can be @reboot.
> 
>> I wist to use .initialboot to grab the instance configuration from
>> amazon (hostname, root keys etc) and configure appropriately when the
>> new instance starts.
> 
> Again: I don't completely understand your scenario.
> You created one ami, and you want to "close it back", and clone it several
> times, so after it's first reboot, it should do the initalboot steps?
> Why do you want to wait?
> What I just found about the /.initialboot, it's a simple shell script.
> If you need to wait here, why not just put a sleep command into the
> beginning of the script?
> Or if you have to wait for some specific resource: Why don't poll it once
> per every 5 sec or so?
> 
> Cheers,
> Gyu
> 





More information about the OmniOS-discuss mailing list