[OmniOS-discuss] initialboot

PÁSZTOR György pasztor at sagv5.gyakg.u-szeged.hu
Mon Jul 31 20:49:05 UTC 2017


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