[systemd-devel] Custom power off

Zygmunt Ptak zygmuntptak at gmail.com
Wed Dec 20 18:30:50 UTC 2017


Ouch, thanks

Doesn't saw that.

2017-12-20 19:19 GMT+01:00 Reindl Harald <h.reindl at thelounge.net>:
>
>
> Am 20.12.2017 um 18:54 schrieb Zygmunt Ptak:
>>
>> I want to implement custom power off method.
>> I added to the yocto script: /usr/sbin/halt.local which will power off
>> my machine.
>>
>> [  OK  ] Reached target Shutdown.
>>           Starting /usr/sbin/halt.local Compatibility...
>> My power off
>> [   76.916101] EXT4-fs (mmcblk1p1): re-mounted. Opts: (null)
>> [  OK  ] Started /usr/sbin/halt.local Compatibility.
>> [  OK  ] Reached target Final Step.
>>           Starting Power-Off...
>> [   77.357245] systemd-shutdown[1]: All filesystems unmounted.
>> [   77.362835] systemd-shutdown[1]: Deactivating swaps.
>> [   77.367923] systemd-shutdown[1]: All swaps deactivated.
>> [   77.373168] systemd-shutdown[1]: Detaching loop devices.
>> [   77.390252] systemd-shutdown[1]: All loop devices detached.
>> [   77.395883] systemd-shutdown[1]: Detaching DM devices.
>> [   77.401337] systemd-shutdown[1]: All DM devices detached.
>> [   77.409285] systemd-shutdown[1]: Powering off.
>> [   77.431515] reboot: System halted
>>
>> "My power off" will power off machine, but to early.
>>
>> I want to call my script after:
>> "[   77.409285] systemd-shutdown[1]: Powering off."
>>
>> How to do it?
>
> how do you imagine that after "All filesystems unmounted"
>
> probably somehow with dracut/initramfs but not that way and even then you
> can't do that much after everything is gone
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list