[Bug 407269] New: apcupsd fails to power off the UPS
https://bugzilla.novell.com/show_bug.cgi?id=407269 Summary: apcupsd fails to power off the UPS Product: openSUSE 10.3 Version: Final Platform: x86-64 OS/Version: openSUSE 10.3 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: bradrupp@gmail.com QAContact: qa@suse.de Found By: Customer Created an attachment (id=226546) --> (https://bugzilla.novell.com/attachment.cgi?id=226546) Modified /etc/init.d/apcupsd script RPM: apcupsd-3.14.1-34 UPS: APC Smart UPS 1000 SC with supplied serial cable Note: This problem also exists in SLES 10 SP1 The last task during shutdown that the apcupsd daemon performs is to power off the UPS. It does this via the HALT_POWERDOWN_INSERT variable in /etc/init.d/halt (see /etc/sysconfig/shutdown for the definition of the HALT_POWERDOWN_INSERT variable). This bit of code causes the halt script to call "/etc/init.d/apcupsd try-powerdown." The /etc/init.d/apcupsd script fails and exists with error code 5 (program not installed). The problem is the test on line 29 of /etc/init.d/apcupsd. 28: APCUPSD=/usr/sbin/apcupsd 29: test -x $APCUPSD || exit 5 At this point in the /etc/init.d/halt script, the /usr file system may have been unmounted. Thus /usr/sbin/apcupsd does not exist and the /etc/init.d/apcupsd script exits with error code 5. The /etc/init.d/apcupsd script should be modified to exit with error code 5 if and only if /usr/sbin/apcupsd AND /sbin/apcupsd-lite do not exist: 28: APCUPSD=/usr/sbin/apcupsd 29: APCUPSD_LITE=/sbin/apcupsd-lite 30: test -x $APCUPSD -o -x $APCUPSD_LITE || exit 5 I have attached my modified version of /etc/init.d/apcupsd to this defect. The following are the only changes I made: - Line 29: Added the variable APCUPSD_LITE - Line 30: Test for both $APCUPSD and $APCUPSD_LITE - Line 141: Use the variable $APCUPSD_LITE instead of the hard coded string /sbin/apcupsd-lite -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=407269
Cyril Hrubis
https://bugzilla.novell.com/show_bug.cgi?id=407269
User sbrabec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=407269#c1
Stanislav Brabec
https://bugzilla.novell.com/show_bug.cgi?id=407269
User sbrabec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=407269#c2
Stanislav Brabec
participants (1)
-
bugzilla_noreply@novell.com