<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>100614</bug_id>
          
          <creation_ts>2005-07-28 10:45 0000</creation_ts>
          <short_desc>apcupsd does not support &apos;Autorestart of loads after UPS shutdown&apos; on some Back-UPS</short_desc>
          <delta_ts>2005-09-29 07:24:18 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>peter@kerwien.homeip.net</reporter>
          <assigned_to>tantive@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>peter@kerwien.homeip.net</who>
            <bug_when>2005-07-28 10:45:12 0000</bug_when>
            <thetext>When a powerfailure occurs, apcupsd issues the killpower command to the UPS. But
it seems to do that in such a way that it won&apos;t support the feature &apos;Autorestart
of loads after UPS shutdown&apos; on e.g. a Back-UPS RS (using USB cable). When the
power is restored, the UPS will not start up again. Leaving the server unaware
that it also can start up.


Reproducible: Always
Steps to Reproduce:
1. Install sys-power/apcupsd-3.0.15-r1
2. Startup apcupsd and remove power. Wait until PC and UPS has halted.
3. Restore power to the UPS.

Actual Results:  
The UPS is not powered up after power failure.

Expected Results:  
The UPS should power up after power failure.

I have tested the same thing with apcupsd-3.10.18 and it seems to power down the
UPS is a way that it will restart after power failure.

emerge --info
Portage 2.0.51.22-r2 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.5-r0,
2.6.13-rc3 x86_64)
=================================================================
System uname: 2.6.13-rc3 x86_64 AMD Athlon(tm) 64 Processor 2800+
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS=&quot;amd64&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;x86_64-pc-linux-gnu&quot;
CFLAGS=&quot;-march=athlon64 -O2 -pipe -fomit-frame-pointer&quot;
CHOST=&quot;x86_64-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-march=athlon64 -O2 -pipe -fomit-frame-pointer&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig distlocks sandbox sfperms strict&quot;
GENTOO_MIRRORS=&quot;ftp://mirror.pudas.net/gentoo&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
SYNC=&quot;rsync://server1/gentoo-portage&quot;
USE=&quot;amd64 X acpi alsa apache2 arts avi berkdb bitmap-fonts cdr crypt cups curl
dvd dvdr encode esd fam flac foomaticdb fortran gd gdbm gif gpm gtk gtk2
imagemagick imap imlib java jpeg junit kde libwww lzw lzw-tiff mad maildir motif
mp3 mpeg mysql ncurses nls nptl nptlonly ogg oggvorbis opengl pam pdflib perl
png python qt quicktime readline samba sdl spell ssl tcltk tcpd tiff
truetype-fonts type1-fonts usb userlocales vorbis xml xml2 xmms xpm xv xvid zlib
userland_GNU kernel_linux elibc_glibc&quot;
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tantive@gentoo.org</who>
            <bug_when>2005-07-28 15:25:03 0000</bug_when>
            <thetext>The &quot;switch power on for things connected to the ups when power returns&quot; is set
up in the ups. On smart ups systems you can configure this feature over the
serial cable. I guess you can do this for the back ups rs as well over usb.
So i don&apos;t think this is not a software problem but an configuration problem as
the software is not running when the power comes back.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>peter@kerwien.homeip.net</who>
            <bug_when>2005-07-30 08:09:19 0000</bug_when>
            <thetext>With the same configuration I get these messages while doing apcupsd --killpower

3.10.15-r1:

apcupsd: linux-usb.c:1254 Kill power function CI_DelayBeforeShutdown ci=62
value=20 OK.
apcupsd: linux-usb.c:1281 Kill power function &quot;CI_DelayBeforeShutdown&quot; seems to
have worked. Continuing ...
apcupsd: linux-usb.c:1254 Kill power function CI_ShutdownRequested ci=42 value=1 OK.
apcupsd: linux-usb.c:1288 Kill power function &quot;CI_ShutdownRequested&quot; seems to
have worked. Continuing ...
apcupsd: linux-usb.c:1254 Kill power function CI_APCShutdownAfterDelay ci=18
value=30 OK.
apcupsd: linux-usb.c:1295 Kill power function &quot;CI_APCShutdownAfterDelay&quot; seems
to have worked. Continuing ...
apcupsd: linux-usb.c:1254 Kill power function CI_APCForceShutdown ci=61 value=1 OK.
apcupsd: linux-usb.c:1302 Kill power function &quot;CI_APCForceShutdown&quot; seems to
have worked. Done ...

3.10.18:

apcupsd: usb.c:682 UPS appears to support BackUPS style shutdown.

I don&apos;t know if it only a matter of different output format, but it for sure
shutdowns the UPS in different ways. The UPS won&apos;t turn on after the 3.10.15
shutdown but it will with 3.10.18.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tantive@gentoo.org</who>
            <bug_when>2005-08-01 10:05:06 0000</bug_when>
            <thetext>I added apcupsd-3.10.18 to the tree.
Please test it and report back if your problem is fixed then.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>peter@kerwien.homeip.net</who>
            <bug_when>2005-08-01 11:24:59 0000</bug_when>
            <thetext>Thanks, I will test it.

After installation of 3.10.18, I don&apos;t get the apache config file
/etc/apache2/conf/modules.d/60_apcupsd.conf installed. Here is probably the reason:

...
gmake[1]: Leaving directory
`/var/tmp/portage/apcupsd-3.10.18/work/apcupsd-3.10.18/autoconf&apos;
cp: cannot stat `/3.10.18/apache.conf&apos;: No such file or directory
-------------------------------------------------------
You should not use ${D} with helpers.
  --&gt;
-------------------------------------------------------
install: cannot stat `/var/tmp/portage/apcupsd-3.10.18/temp/60_apcupsd.conf&apos;: No
such file or directory
 * Applying smtp.patch ...                                                [ ok ]
...

I&apos;m installing apcupsd with the following USE flags:

Calculating dependencies ...done!
[ebuild   R   ] sys-power/apcupsd-3.10.18  +apache2 +cgi -doc +ncurses +nls
-snmp -threads +usb 0 kB
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tantive@gentoo.org</who>
            <bug_when>2005-08-01 13:19:29 0000</bug_when>
            <thetext>Please sync again and try again. I fixed that bug for .18 some minutes after i
committed the .18 ebuild. Sorry ;)


gmake[1]: Entering directory
`/var/tmp/portage/apcupsd-3.10.18/work/apcupsd-3.10.18/autoconf&apos;
gmake[1]: Nothing to be done for `install&apos;.
gmake[1]: Leaving directory
`/var/tmp/portage/apcupsd-3.10.18/work/apcupsd-3.10.18/autoconf&apos;
-------------------------------------------------------
You should not use ${D} with helpers.
  --&gt;
-------------------------------------------------------
 * Applying smtp.patch ...                                                     
     [ ok ]
man:</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>peter@kerwien.homeip.net</who>
            <bug_when>2005-08-01 23:46:04 0000</bug_when>
            <thetext>But the file seems to be installed in the wrong place:

...
&gt;&gt;&gt; /usr/sbin/smtp
&gt;&gt;&gt; /usr/sbin/apcaccess
&gt;&gt;&gt; /usr/sbin/powerflute
&gt;&gt;&gt; /usr/sbin/apcnisd
&gt;&gt;&gt; /usr/sbin/apctest
&gt;&gt;&gt; /usr/sbin/apcupsd
&gt;&gt;&gt; /60_apcupsd.conf
&gt;&gt;&gt; Safely unmerging already-installed instance...
...
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tantive@gentoo.org</who>
            <bug_when>2005-08-02 09:52:30 0000</bug_when>
            <thetext>Please test again with -r1</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tantive@gentoo.org</who>
            <bug_when>2005-08-09 14:08:57 0000</bug_when>
            <thetext>Peter: Fixed or not?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>peter@kerwien.homeip.net</who>
            <bug_when>2005-08-09 15:03:22 0000</bug_when>
            <thetext>Sorry for the delay, but it seems that my last message wasn&apos;t logged correctly :-(

The 60_apcupsd.conf file is now installed as:

/etc/apache2/modules.d/60_apcupsd.conf

But, all the other packages (like webalizer, mod_php, apcupsd-3.10.15-r1)
install their files under:

/etc/apache2/conf/modules.d
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>peter@kerwien.homeip.net</who>
            <bug_when>2005-09-09 09:18:46 0000</bug_when>
            <thetext>Bump.

Could you please correct this last thing about where the 60_apcupsd.conf file is
placed during installation? Because it wont&apos;t work out-of-the box with
apache-2.0.54-r9.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>peter@kerwien.homeip.net</who>
            <bug_when>2005-09-21 13:50:03 0000</bug_when>
            <thetext>You can close this one now when apache-2.0.54-r31 went stable.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tantive@gentoo.org</who>
            <bug_when>2005-09-29 07:24:18 0000</bug_when>
            <thetext>Thanks for your help.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>