see man:bootup for the general architecture of shutdown and man:systemd-shutdown for how to add a script as the "ultimate phase" of the shutdown

doing it with services is tricky, your approch will make it be called at shutdown but you did not specify "when" during shutdown, so systemd might schedule it at any point

you could try to plug it in at the right place using some Before= and After= but if that command is the "real shutdown" command, i'd use the process described in systemd-shutdown


regards
Jérémy

On 27/10/2017 11:43, D.S. Ljungmark wrote:
So, I've got a piece of hardware I want to do a final handover to just
around reboot.target / shutdown.target

This will then cause the entire CPU and hardware allocated to it to
actually drop power (and schedule re-power), so I don't want to do this
earlier.



Is it simply to do:

[Unit]
DefaultDependencies=no

[Service]
ExecStart=/usr/bin/big-buck-bunny /dev/i2c-1
Type=oneshot

[Install]
WantedBy=reboot.target



or am I missing something here? ( Perhaps the fact that systemd has
already pivoted root to somewhere else?)

//D.S.
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

--
SMILE <http://www.smile.eu/>

20 rue des Jardins
92600 Asnières-sur-Seine

        
*Jérémy ROSEN*
Architecte technique
Responsable de l'expertise Smile-ECS

email [email protected] <mailto:[email protected]>
phone +33141402967
url http://www.smile.eu

Twitter <https://twitter.com/GroupeSmile> Facebook <https://www.facebook.com/smileopensource> LinkedIn <https://www.linkedin.com/company/smile> Github <https://github.com/Smile-SA>


Découvrez l’univers Smile, rendez-vous sur smile.eu <http://smile.eu/?utm_source=signature&utm_medium=email&utm_campaign=signature>

eco Pour la planète, n'imprimez ce mail que si c'est nécessaire
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to