Control: tag -1 patch

Hi Nate (2013.12.06_02:56:54_+0200)
> However, it is my understanding that apcupsd should not have written
> the file in the first place.

Just ran into this too, and I agree.

The problem is that the do_shutdown() function (when the batter has run
flat) disables logins unconditionally.

It looks like this has already been discussed upstream
http://sourceforge.net/p/apcupsd/mailman/message/30818550/#msg30818564
without deciding on any course of action.

However, we are in a slightly different position to upstream. The
upstream init script contains:

>     if [ ! -f @nologdir@/nologin.boot -a -f @nologdir@/nologin ]; then
>       rm -f @nologdir@/nologin
>     fi

And ours doesn't. So in Debian, creating this file automatically is
definitely wrong.

I suggest:

--- a/src/action.c
+++ b/src/action.c
@@ -208,7 +208,8 @@
    delete_lockfile(ups);
    ups->set_fastpoll();
    make_file(ups, ups->pwrfailpath);
-   prohibit_logins(ups);
+   if (ups->nologin.type != NEVER)
+       prohibit_logins(ups);
 
    if (!ups->is_slave()) {
       /*

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  H: +27 21 461 1230 C: +27 72 419 8559


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to