[OE-core] where is the safest place to put a single-shot "run and reboot" script?
Robert P. J. Day
rpjday at crashcourse.ca
Fri Aug 5 15:40:35 UTC 2016
On Fri, 5 Aug 2016, Khem Raj wrote:
>
>
> 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.
it *can* be only because this is a specialized image that is meant
to run only once *anyway*. so, yes, that is a cleaner suggestion, i'll
do that.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
More information about the Openembedded-core
mailing list