Package: nut
Version: 2.7.1-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu vivid ubuntu-patch
*** /tmp/tmpvfdwEw/bug_body
In Ubuntu, the attached patch was applied to achieve the following:
Default/sample ups.conf has maxretry setting at end. Above that are examples
and an empty line.
Uncommenting any of the examples or merging with older configs are likely to
end up with a broken
config file, since the parser will interpret existing maxretries to be inside
driver definition.
Included patch follows conventions used in other nut config files.
* debian/patches/0006-ups-conf-reorder.patch: Move maxretry setting
above Examples section, closer to the "outside of a driver definition"
comment. (LP: #1405822)
Thanks for considering the patch.
-- System Information:
Debian Release: jessie/sid
APT prefers utopic-updates
APT policy: (500, 'utopic-updates'), (500, 'utopic-security'), (500,
'utopic-proposed'), (500, 'utopic'), (100, 'utopic-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.16.0-30-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru nut-2.7.1/debian/changelog nut-2.7.1/debian/changelog
diff -Nru nut-2.7.1/debian/patches/0006-ups-conf-maxretry.patch nut-2.7.1/debian/patches/0006-ups-conf-maxretry.patch
--- nut-2.7.1/debian/patches/0006-ups-conf-maxretry.patch 2013-11-24 14:58:03.000000000 -0500
+++ nut-2.7.1/debian/patches/0006-ups-conf-maxretry.patch 2015-02-03 08:23:00.000000000 -0500
@@ -25,10 +25,15 @@
#
# These directives are common to all drivers that support ups.conf:
#
-@@ -102,3 +120,6 @@
+@@ -78,7 +96,10 @@
#
- # To find out if your driver supports any extra settings, start it with
- # the -h option and/or read the driver's documentation.
+ # Anything else is passed through to the hardware-specific part of
+ # the driver.
+-#
+
+# Set maxretry to 3 by default, this should mitigate race with slow devices:
+maxretry = 3
++
+ # Examples
+ # --------
+ #