ConditionFirstBoot question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a system that needs to perform some tasks on first boot.  I have this working for the most part but I had some general questions and would like some guidance on the proper implementation.

The tasks I need to perform on first boot include changing the hostname, formatting some flash and mounting the filesystem, updating some config files, etc.

I found that if I put these tasks sequentially into single script /etc/hostname is updated and the hostname command returns the updated value, the hostname shown at login is still the old value.

Now if I split tasks into individual services and order them with Before and After the hostname is correct at login.

I suspect this is because of systemd's parallelization and the monolithic script will not finish before the service or target that pulls in /etc/hostname, is that correct?

It is not clear to me what specific target or service my service needs to be set Before so that the script can finish.

It also occurs to me that perhaps it makes more sense to split the tasks out so that they can run in parallel to optimize the boot, would this be the best practice?

Thanks, Matt.

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux