Dnia środa, 9 sierpnia 2017 11:51:07 CEST Tilman Baumann pisze:
> On 09.08.2017 11:28, Tilman Baumann wrote:
> > DL;DR
> > UPS shutdowns are tricky. Clean file-systems are not the only concern.
> > But if you can make assumptions about your storage backend you might be
> > able to cut corners safely.
> > 
> > In my experience, the only place where you can hook in a non racy way is
> > in the kernel.
> > 
> > https://unix.stackexchange.com/questions/122557/how-does-the-system-shutdo
> > wn-of-a-linux-kernel-work-internally
> Apologies, I copy and pasted the wrong link
> https://stackoverflow.com/questions/5938325/how-do-i-detect-reboot-shutdown-> 
> from-a-linux-driver
> 
> The magic is here IIRC
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree
> /kernel/reboot.c _______________________________________________


NUT looks like quite active based on their website.
Microupsd daemon handles also some switches and leds for the end user, I mean 
user can press some switch on the device and daemon will perform an action 
described in configuration file, so porting everything to NUT would take more 
time that I actually got for this.

Thank You all. I will try to write some simple binary, place it in 
/lib/systemd/system-shutdown/
and test it.

Best Regards
Marek

> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel


_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to