[OE-core] where is the safest place to put a single-shot "run and reboot" script?

Khem Raj raj.khem at gmail.com
Fri Aug 5 15:36:09 UTC 2016



On 8/5/16 8:31 AM, Robert P. J. Day wrote:
> On Fri, 5 Aug 2016, Khem Raj wrote:
> 
>>
>>
>> On 8/5/16 8:14 AM, Robert P. J. Day wrote:
>>>
>>>   i have a systemd-based image that, after coming up normally, i want
>>> to fire off a one-time script which, after completion, reboots. i've
>>> been told that using systemd's run-postinsts is discouraged and, for
>>> now, i just want the simplest and quickest solution.
>>>
>>>   suggestions?
>>
>> https://github.com/systemd/systemd/blob/master/units/systemd-firstboot.service.in
> 
>   not sure if this makes a difference, but i don't need the
> "firstboot" functionality as this script is to be run out of a ramdisk
> so there is no need for it to keep track if it was ever run before. i
> just need to run the script once the rest of the system is up, then
> reboot, nothing more.

should this script be run on every reboot ? if thats the case then write
a normal service and hook it to your final target e.g. graphical.target
or wherever you want to insert it in boot sequence.

> 
> rday
> 



More information about the Openembedded-core mailing list