<div dir="ltr"><div dir="ltr">
<span class="gmail-im">>> Also the upsmon POWERDOWNFLAG fits into this question<br></span><br></div><div dir="ltr">> I'm confused. That flag can't be persistent across reboots, can it? <br></div><div dir="ltr"><br></div><div>Well, there is little practical reason, if any, for an `/etc/killpower` (as it is commonly named) to exist when you boot. It also has a potential for confusion if not deleted, as we discovered in some recent discussion - e.g. due to no packaged NUT init scripts running to remove it, and then upon every shutdown or reboot the late-endgame NUT integration finds it and tells the UPS to power off because at that point presence of the file means an FSD is in progress.</div><div><br></div><div>So for a few releases now, the documented recommendation is for packagers to use a tmpfs to place that file (and do so in a root-owned subdirectory). Side considerations are that this also reduces storage wear where it matters, and the FS is more likely to be writeable. </div><div>Also while the `upsmon` part running as `root` may write into `/etc` if it is not part of some R/O operating environment image, there is little reason to mess up its timestamps etc, as some have complained. Common permissions for `/etc` itself do however ensure the constraints that a rogue unprivileged program should not be able to create that default file name and cause a DoS by telling UPSes to turn off.</div><div><br></div><div>But these are nuances known when packaging for a particular deployment strategy, not something that is good to impose out of the box, so the default is as it was for least-surprise for long-time BYOS rebuilders going from source.</div><div><br></div><div>Hope this helps,</div><div>Jim Klimov</div><div><br></div><div class="gmail_quote gmail_quote_container"><br></div></div>