[packages/nut] - up to 2.7.2
arekm
arekm at pld-linux.org
Sat Sep 20 23:47:02 CEST 2014
commit c32c067c6322a4382963a809bdd5ab7bcd70dc1b
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Sep 20 23:46:58 2014 +0200
- up to 2.7.2
nut-2.6.5-ipmifix.patch | 138 --------------------------------------------
nut-2.6.5-pthreadfix.patch | 32 ----------
nut-2.6.5-unreachable.patch | 39 -------------
nut-config.patch | 2 +-
nut.init | 10 ++--
nut.spec | 70 +++++++++-------------
systemd-sysconfig.patch | 4 +-
7 files changed, 35 insertions(+), 260 deletions(-)
---
diff --git a/nut.spec b/nut.spec
index 9f626c0..7abff05 100644
--- a/nut.spec
+++ b/nut.spec
@@ -3,7 +3,6 @@
#
# Conditional build:
%bcond_without usb # build without usb drivers
-%bcond_with hal # build with hal support (DEPRECATED)
%bcond_without snmp # build without snmp driver
%bcond_without cgi # build without cgi support
%bcond_without neon # build with neon based XML/HTTP driver
@@ -11,12 +10,12 @@
Summary: Network UPS Tools
Summary(pl.UTF-8): Sieciowe narzędzie do UPS-ów
Name: nut
-Version: 2.6.5
-Release: 6
+Version: 2.7.2
+Release: 1
License: GPL
Group: Applications/System
-Source0: http://www.networkupstools.org/source/2.6/%{name}-%{version}.tar.gz
-# Source0-md5: e6eac4fa04baff0d0a827d64efe81a7e
+Source0: http://www.networkupstools.org/source/2.7/%{name}-%{version}.tar.gz
+# Source0-md5: c3568b42e058cfc385b46d25140dced4
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: %{name}-upsmon.init
@@ -28,17 +27,12 @@ Patch3: %{name}-upssched-cmd-sysconf.patch
Patch4: %{name}-matrix.patch
Patch5: systemd-sysconfig.patch
Patch6: bcmxcp-off-by-one.patch
-Patch7: nut-2.6.5-ipmifix.patch
-Patch8: nut-2.6.5-pthreadfix.patch
-Patch9: nut-2.6.5-unreachable.patch
URL: http://www.networkupstools.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: avahi-devel
-%{?with_hal:BuildRequires: dbus-glib-devel}
BuildRequires: freeipmi-devel
%{?with_cgi:BuildRequires: gd-devel >= 2.0.15}
-%{?with_hal:BuildRequires: hal-devel >= 0.5.8}
BuildRequires: libltdl-devel
BuildRequires: libtool
%{?with_usb:BuildRequires: libusb-compat-devel}
@@ -52,6 +46,7 @@ Requires: systemd-units >= 38
Requires(post,preun): /sbin/chkconfig
Requires: %{name}-common = %{version}-%{release}
Requires: rc-scripts
+Obsoletes: nut-hal
Obsoletes: smartupstools
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -180,18 +175,6 @@ Object file and header for developing NUT clients.
%description devel -l pl.UTF-8
Plik wynikowy oraz nagłówek służące do tworzenia klientów NUT-a.
-%package hal
-Summary: NUT integration with FreeDesktop HAL
-Summary(pl.UTF-8): Pliki do integracji NUT-a z HAL-em
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-
-%description hal
-NUT integration with FreeDesktop HAL.
-
-%description hal -l pl.UTF-8
-Pliki do integracji NUT-a z HAL-em.
-
%prep
%setup -q
%patch0 -p1
@@ -201,9 +184,6 @@ Pliki do integracji NUT-a z HAL-em.
%patch4 -p1
%patch5 -p1
%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
%build
cp -f /usr/share/automake/config.sub .
@@ -217,17 +197,14 @@ cp -f /usr/share/automake/config.sub .
--with-serial \
--with%{!?with_usb:out}-usb \
--with%{!?with_snmp:out}-snmp \
- --with%{!?with_hal:out}-hal \
--with%{!?with_cgi:out}-cgi \
--with-avahi \
--with-ipmi \
--with-dev \
--with%{!?with_neon:out}-neon \
--with-ssl \
+ --with-openssl \
%{?with_usb:--with-udev-dir=/etc/udev} \
- %{!?with_hal:--without-hal} \
- %{?with_hal:--with-hal-callouts-path=%{_libdir}/hal} \
- %{?with_hal:--with-hal-fdi-path=%{_datadir}/hal/fdi/information/20thirdparty} \
--with-statepath=%{_var}/lib/ups \
--with-drvpath=/lib/nut \
--with-cgipath=/home/services/httpd/cgi-bin \
@@ -341,6 +318,7 @@ fi
%attr(755,root,root) %{_bindir}/upslog
%attr(755,root,root) %{_bindir}/upsrw
%attr(755,root,root) %{_sbindir}/upsd
+%attr(755,root,root) %{_sbindir}/upsdrvctl
%attr(755,root,root) /sbin/poweroff-ups
%attr(755,root,root) %ghost %{_libdir}/libnutscan.so.1
%attr(755,root,root) %{_libdir}/libnutscan.so.*.*.*
@@ -366,8 +344,10 @@ fi
%{_mandir}/man8/upsrw.8*
%dir %attr(770,root,ups) /var/lib/ups
%dir /lib/nut
+%attr(755,root,root) /lib/nut/al175
%attr(755,root,root) /lib/nut/apcsmart
%attr(755,root,root) /lib/nut/apcsmart-old
+%attr(755,root,root) /lib/nut/apcupsd-ups
%attr(755,root,root) /lib/nut/bcmxcp
%{?with_usb:%attr(755,root,root) /lib/nut/bcmxcp_usb}
%attr(755,root,root) /lib/nut/belkin
@@ -395,6 +375,8 @@ fi
%attr(755,root,root) /lib/nut/mge-utalk
%attr(755,root,root) /lib/nut/microdowell
%{?with_neon:%attr(755,root,root) /lib/nut/netxml-ups}
+%{?with_usb:%attr(755,root,root) /lib/nut/nutdrv_atcl_usb}
+%attr(755,root,root) /lib/nut/nutdrv_qx
%attr(755,root,root) /lib/nut/nut-ipmipsu
%attr(755,root,root) /lib/nut/oldmge-shut
%attr(755,root,root) /lib/nut/oneac
@@ -403,6 +385,8 @@ fi
%attr(755,root,root) /lib/nut/powerpanel
%attr(755,root,root) /lib/nut/rhino
%{?with_usb:%attr(755,root,root) /lib/nut/richcomm_usb}
+%attr(755,root,root) /lib/nut/riello_ser
+%{?with_usb:%attr(755,root,root) /lib/nut/riello_usb}
%attr(755,root,root) /lib/nut/safenet
%attr(755,root,root) /lib/nut/skel
%{?with_snmp:%attr(755,root,root) /lib/nut/snmp-ups}
@@ -411,15 +395,16 @@ fi
%attr(755,root,root) /lib/nut/tripplitesu
%{?with_usb:%attr(755,root,root) /lib/nut/tripplite_usb}
%attr(755,root,root) /lib/nut/upscode2
-%attr(755,root,root) /lib/nut/upsdrvctl
%{?with_usb:%attr(755,root,root) /lib/nut/usbhid-ups}
%attr(755,root,root) /lib/nut/victronups
%dir %{_datadir}/nut
%{_datadir}/nut/cmdvartab
%{_datadir}/nut/driver.list
%{_mandir}/man5/nut.conf.5*
+%{_mandir}/man8/al175.8*
%{_mandir}/man8/apcsmart.8*
%{_mandir}/man8/apcsmart-old.8*
+%{_mandir}/man8/apcupsd-ups.8*
%{_mandir}/man8/bcmxcp.8*
%{?with_usb:%{_mandir}/man8/bcmxcp_usb.8*}
%{_mandir}/man8/belkin.8*
@@ -428,7 +413,8 @@ fi
%{_mandir}/man8/bestfortress.8*
%{_mandir}/man8/bestuferrups.8*
%{_mandir}/man8/bestups.8*
-%{_mandir}/man8/blazer.8*
+%{_mandir}/man8/blazer_ser.8*
+%{?with_usb:%{_mandir}/man8/blazer_usb.8*}
%{_mandir}/man8/clone.8*
%{_mandir}/man8/dummy-ups.8*
%{_mandir}/man8/etapro.8*
@@ -445,6 +431,8 @@ fi
%{_mandir}/man8/mge-utalk.8*
%{_mandir}/man8/microdowell.8*
%{?with_neon:%{_mandir}/man8/netxml-ups.8*}
+%{?with_usb:%{_mandir}/man8/nutdrv_atcl_usb.8*}
+%{_mandir}/man8/nutdrv_qx.8*
%{_mandir}/man8/nut-ipmipsu.8*
%{_mandir}/man8/nutupsdrv.8*
%{_mandir}/man8/oneac.8*
@@ -453,6 +441,8 @@ fi
%{_mandir}/man8/powerpanel.8*
%{_mandir}/man8/rhino.8*
%{?with_usb:%{_mandir}/man8/richcomm_usb.8*}
+%{_mandir}/man8/riello_ser.8*
+%{?with_usb:%{_mandir}/man8/riello_usb.8*}
%{_mandir}/man8/safenet.8*
%{?with_snmp:%{_mandir}/man8/snmp-ups.8*}
%{_mandir}/man8/solis.8*
@@ -468,7 +458,9 @@ fi
%defattr(644,root,root,755)
%doc AUTHORS MAINTAINERS NEWS README UPGRADING ChangeLog docs
%dir %{_sysconfdir}
-%attr(755,root,root) %ghost %{_libdir}/libupsclient.so.1
+%attr(755,root,root) %ghost %{_libdir}/libnutclient.so.0
+%attr(755,root,root) %{_libdir}/libnutclient.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libupsclient.so.4
%attr(755,root,root) %{_libdir}/libupsclient.so.*.*.*
%files client
@@ -506,21 +498,13 @@ fi
%{_mandir}/man8/upsstats.cgi.8*
%endif
-%if %{with hal}
-%files hal
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/hal/hald-addon-bcmxcp_usb
-%attr(755,root,root) %{_libdir}/hal/hald-addon-blazer_usb
-%attr(755,root,root) %{_libdir}/hal/hald-addon-tripplite_usb
-%attr(755,root,root) %{_libdir}/hal/hald-addon-usbhid-ups
-%{_datadir}/hal/fdi/information/20thirdparty/20-ups-nut-device.fdi
-%endif
-
%files devel
%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libnutclient.so
%attr(755,root,root) %{_libdir}/libupsclient.so
%attr(755,root,root) %{_libdir}/libnutscan.so
-%{_pkgconfigdir}/libupsclient.pc
+%{_pkgconfigdir}/libnutclient.pc
%{_pkgconfigdir}/libnutscan.pc
+%{_pkgconfigdir}/libupsclient.pc
%{_includedir}/*.h
%{_mandir}/man3/*.3*
diff --git a/nut-2.6.5-ipmifix.patch b/nut-2.6.5-ipmifix.patch
deleted file mode 100644
index db7bff8..0000000
--- a/nut-2.6.5-ipmifix.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-diff -up nut-2.6.5/drivers/nut-libfreeipmi.c.ipmifix nut-2.6.5/drivers/nut-libfreeipmi.c
---- nut-2.6.5/drivers/nut-libfreeipmi.c.ipmifix 2012-07-31 19:38:59.000000000 +0200
-+++ nut-2.6.5/drivers/nut-libfreeipmi.c 2012-09-04 09:42:48.000000000 +0200
-@@ -49,6 +49,36 @@
- #include "nut-ipmi.h"
- #include "dstate.h"
-
-+#ifdef HAVE_FREEIPMI_11X_12X
-+#define ipmi_fru_parse_ctx_t ipmi_fru_ctx_t
-+#define nut_ipmi_fru_parse_close_device_id nut_ipmi_fru_close_device_id
-+#define nut_ipmi_fru_parse_ctx_destroy nut_ipmi_fru_ctx_destroy
-+#define nut_ipmi_fru_parse_ctx_create nut_ipmi_fru_ctx_create
-+#define nut_ipmi_fru_parse_ctx_set_flags nut_ipmi_fru_ctx_set_flags
-+#define nut_ipmi_fru_parse_open_device_id nut_ipmi_fru_open_device_id
-+#define nut_ipmi_fru_parse_ctx_errormsg nut_ipmi_fru_ctx_errormsg
-+#define nut_ipmi_fru_parse_next nut_ipmi_fru_next
-+#define IPMI_FRU_PARSE_AREA_SIZE_MAX IPMI_FRU_AREA_SIZE_MAX
-+#define IPMI_FRU_PARSE_FLAGS_SKIP_CHECKSUM_CHECKS IPMI_FRU_FLAGS_SKIP_CHECKSUM_CHECKS
-+#define IPMI_FRU_PARSE_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION IPMI_FRU_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION
-+#define IPMI_FRU_PARSE_AREA_TYPE_BOARD_INFO_AREA IPMI_FRU_AREA_TYPE_BOARD_INFO_AREA
-+#define ipmi_fru_parse_field_t ipmi_fru_field_t
-+#define ipmi_fru_parse_ctx_create ipmi_fru_ctx_create
-+#define ipmi_fru_parse_ctx_set_flags ipmi_fru_ctx_set_flags
-+#define ipmi_fru_parse_ctx_strerror ipmi_fru_ctx_strerror
-+#define ipmi_fru_parse_ctx_errnum ipmi_fru_ctx_errnum
-+#define ipmi_fru_parse_open_device_id ipmi_fru_open_device_id
-+#define ipmi_fru_parse_ctx_errormsg ipmi_fru_ctx_errormsg
-+#define ipmi_fru_parse_read_data_area ipmi_fru_read_data_area
-+#define ipmi_fru_parse_type_length_field_to_string ipmi_fru_type_length_field_to_string
-+#define ipmi_fru_parse_close_device_id ipmi_fru_close_device_id
-+#define ipmi_fru_parse_ctx_destroy ipmi_fru_ctx_destroy
-+#define ipmi_fru_parse_multirecord_power_supply_information ipmi_fru_multirecord_power_supply_information
-+#define ipmi_fru_parse_board_info_area ipmi_fru_board_info_area
-+#define ipmi_fru_parse_next ipmi_fru_next
-+#define IPMI_FRU_PARSE_AREA_STRING_MAX IPMI_FRU_AREA_STRING_MAX
-+#endif
-+
- /* FreeIPMI defines */
- #define IPMI_FRU_STR_BUFLEN 1024
- /* haven't seen a motherboard with more than 2-3 so far,
-diff -up nut-2.6.5/m4/nut_check_libfreeipmi.m4.ipmifix nut-2.6.5/m4/nut_check_libfreeipmi.m4
---- nut-2.6.5/m4/nut_check_libfreeipmi.m4.ipmifix 2012-07-31 19:38:56.000000000 +0200
-+++ nut-2.6.5/m4/nut_check_libfreeipmi.m4 2012-09-04 09:45:45.399328962 +0200
-@@ -66,15 +66,23 @@ if test -z "${nut_have_libfreeipmi_seen}
- dnl when version cannot be tested (prior to 1.0.5, with no pkg-config)
- dnl we have to check for some specific functions
- AC_SEARCH_LIBS([ipmi_ctx_find_inband], [freeipmi], [], [nut_have_freeipmi=no])
-- AC_SEARCH_LIBS([ipmi_fru_parse_ctx_create], [freeipmi], [], [nut_have_freeipmi=no])
-
- AC_SEARCH_LIBS([ipmi_monitoring_init], [ipmimonitoring], [nut_have_freeipmi_monitoring=yes], [nut_have_freeipmi_monitoring=no])
- AC_SEARCH_LIBS([ipmi_monitoring_sensor_read_record_id], [ipmimonitoring], [], [nut_have_freeipmi_monitoring=no])
-
- dnl Check for FreeIPMI 1.1.X / 1.2.X which implies API changes!
-- AC_SEARCH_LIBS([ipmi_sdr_cache_ctx_destroy], [freeipmi], [nut_have_freeipmi_11x_12x=no], [])
-+ nut_have_freeipmi_old="${nut_have_freeipmi}"
-+ AC_SEARCH_LIBS([ipmi_fru_parse_ctx_create], [freeipmi], [nut_have_freeipmi_11x_12x=no], [nut_have_freeipmi_old=no])
-+ AC_SEARCH_LIBS([ipmi_sdr_cache_ctx_destroy], [freeipmi], [nut_have_freeipmi_11x_12x=no], [nut_have_freeipmi_old=no])
-+ AC_SEARCH_LIBS([ipmi_fru_ctx_create], [freeipmi], [nut_have_freeipmi_11x_12x=yes], [nut_have_freeipmi_11x_12x=no])
- AC_SEARCH_LIBS([ipmi_sdr_ctx_destroy], [freeipmi], [nut_have_freeipmi_11x_12x=yes], [nut_have_freeipmi_11x_12x=no])
-
-+ if test "${nut_have_freeipmi}${nut_have_freeipmi_11x_12x}" = "yesyes"; then
-+ AC_DEFINE(HAVE_FREEIPMI_11X_12X, 1, [Define if FreeIPMI 1.1.X / 1.2.X support is available])
-+ elif test "${nut_have_freeipmi_old}" = "no"; then
-+ nut_have_freeipmi="no"
-+ fi
-+
- if test "${nut_have_freeipmi}" = "yes"; then
- nut_with_ipmi="yes"
- nut_ipmi_lib="(FreeIPMI)"
-@@ -84,10 +92,6 @@ if test -z "${nut_have_libfreeipmi_seen}
- LIBIPMI_LIBS="${LIBS}"
- fi
-
-- if test "${nut_have_freeipmi_11x_12x}" = "yes"; then
-- AC_DEFINE(HAVE_FREEIPMI_11X_12X, 1, [Define if FreeIPMI 1.1.X / 1.2.X support is available])
-- fi
--
- if test "${nut_have_freeipmi_monitoring}" = "yes"; then
- AC_DEFINE(HAVE_FREEIPMI_MONITORING, 1, [Define if FreeIPMI monitoring support is available])
- fi
-diff -up nut-2.6.5/tools/nut-scanner/scan_ipmi.c.ipmifix nut-2.6.5/tools/nut-scanner/scan_ipmi.c
---- nut-2.6.5/tools/nut-scanner/scan_ipmi.c.ipmifix 2012-07-31 19:38:58.000000000 +0200
-+++ nut-2.6.5/tools/nut-scanner/scan_ipmi.c 2012-09-04 09:42:35.000000000 +0200
-@@ -34,24 +34,50 @@ static char * libname = "libfreeipmi";
- static lt_dlhandle dl_handle = NULL;
- static const char *dl_error = NULL;
-
--static int (*nut_ipmi_fru_parse_close_device_id) (ipmi_fru_parse_ctx_t ctx);
--static void (*nut_ipmi_fru_parse_ctx_destroy) (ipmi_fru_parse_ctx_t ctx);
- #ifdef HAVE_FREEIPMI_11X_12X
- static void (*nut_ipmi_sdr_ctx_destroy) (ipmi_sdr_ctx_t ctx);
-+static int (*nut_ipmi_fru_close_device_id) (ipmi_fru_ctx_t ctx);
-+static void (*nut_ipmi_fru_ctx_destroy) (ipmi_fru_ctx_t ctx);
-+static ipmi_fru_ctx_t (*nut_ipmi_fru_ctx_create) (ipmi_ctx_t ipmi_ctx);
-+static int (*nut_ipmi_fru_ctx_set_flags) (ipmi_fru_ctx_t ctx, unsigned int flags);
-+static int (*nut_ipmi_fru_open_device_id) (ipmi_fru_ctx_t ctx, uint8_t fru_device_id);
-+static char * (*nut_ipmi_fru_ctx_errormsg) (ipmi_fru_ctx_t ctx);
-+static int (*nut_ipmi_fru_next) (ipmi_fru_ctx_t ctx);
- #else /* HAVE_FREEIPMI_11X_12X */
-+static int (*nut_ipmi_fru_parse_close_device_id) (ipmi_fru_parse_ctx_t ctx);
-+static void (*nut_ipmi_fru_parse_ctx_destroy) (ipmi_fru_parse_ctx_t ctx);
- static void (*nut_ipmi_sdr_cache_ctx_destroy) (ipmi_sdr_cache_ctx_t ctx);
- static void (*nut_ipmi_sdr_parse_ctx_destroy) (ipmi_sdr_parse_ctx_t ctx);
--#endif /* HAVE_FREEIPMI_11X_12X */
- static ipmi_fru_parse_ctx_t (*nut_ipmi_fru_parse_ctx_create) (ipmi_ctx_t ipmi_ctx);
- static int (*nut_ipmi_fru_parse_ctx_set_flags) (ipmi_fru_parse_ctx_t ctx, unsigned int flags);
- static int (*nut_ipmi_fru_parse_open_device_id) (ipmi_fru_parse_ctx_t ctx, uint8_t fru_device_id);
- static char * (*nut_ipmi_fru_parse_ctx_errormsg) (ipmi_fru_parse_ctx_t ctx);
-+static int (*nut_ipmi_fru_parse_next) (ipmi_fru_parse_ctx_t ctx);
-+#endif /* HAVE_FREEIPMI_11X_12X */
-+
-+#ifndef ipmi_fru_parse_ctx_t
-+#define ipmi_fru_parse_ctx_t ipmi_fru_ctx_t
-+#endif
-+
-+#ifndef nut_ipmi_fru_parse_close_device_id
-+#define nut_ipmi_fru_parse_close_device_id nut_ipmi_fru_close_device_id
-+#endif
-+
-+#define nut_ipmi_fru_parse_ctx_destroy nut_ipmi_fru_ctx_destroy
-+#define nut_ipmi_fru_parse_ctx_create nut_ipmi_fru_ctx_create
-+#define nut_ipmi_fru_parse_ctx_set_flags nut_ipmi_fru_ctx_set_flags
-+#define nut_ipmi_fru_parse_open_device_id nut_ipmi_fru_open_device_id
-+#define nut_ipmi_fru_parse_ctx_errormsg nut_ipmi_fru_ctx_errormsg
-+#define nut_ipmi_fru_parse_next nut_ipmi_fru_next
-+#define IPMI_FRU_PARSE_AREA_SIZE_MAX IPMI_FRU_AREA_SIZE_MAX
-+#define IPMI_FRU_PARSE_FLAGS_SKIP_CHECKSUM_CHECKS IPMI_FRU_FLAGS_SKIP_CHECKSUM_CHECKS
-+#define IPMI_FRU_PARSE_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION IPMI_FRU_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION
-+
- static int (*nut_ipmi_fru_parse_read_data_area) (ipmi_fru_parse_ctx_t ctx,
- unsigned int *area_type,
- unsigned int *area_length,
- void *areabuf,
- unsigned int areabuflen);
--static int (*nut_ipmi_fru_parse_next) (ipmi_fru_parse_ctx_t ctx);
- static ipmi_ctx_t (*nut_ipmi_ctx_create) (void);
- static int (*nut_ipmi_ctx_find_inband) (ipmi_ctx_t ctx,
- ipmi_driver_type_t *driver_type,
diff --git a/nut-2.6.5-pthreadfix.patch b/nut-2.6.5-pthreadfix.patch
deleted file mode 100644
index 9aca92b..0000000
--- a/nut-2.6.5-pthreadfix.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -up nut-2.6.5/tools/nut-scanner/nut-scanner.c.pthreadfix nut-2.6.5/tools/nut-scanner/nut-scanner.c
---- nut-2.6.5/tools/nut-scanner/nut-scanner.c.pthreadfix 2012-09-06 13:25:03.856936357 +0200
-+++ nut-2.6.5/tools/nut-scanner/nut-scanner.c 2012-09-06 13:25:03.881936493 +0200
-@@ -434,22 +434,22 @@ display_help:
- }
-
- #ifdef HAVE_PTHREAD
-- if( allow_usb && nutscan_avail_usb ) {
-+ if( allow_usb && nutscan_avail_usb && thread[TYPE_USB]) {
- pthread_join(thread[TYPE_USB],NULL);
- }
-- if( allow_snmp && nutscan_avail_snmp ) {
-+ if( allow_snmp && nutscan_avail_snmp && thread[TYPE_SNMP]) {
- pthread_join(thread[TYPE_SNMP],NULL);
- }
-- if( allow_xml && nutscan_avail_xml_http ) {
-+ if( allow_xml && nutscan_avail_xml_http && thread[TYPE_XML]) {
- pthread_join(thread[TYPE_XML],NULL);
- }
-- if( allow_oldnut && nutscan_avail_nut ) {
-+ if( allow_oldnut && nutscan_avail_nut && thread[TYPE_NUT]) {
- pthread_join(thread[TYPE_NUT],NULL);
- }
-- if( allow_avahi && nutscan_avail_avahi ) {
-+ if( allow_avahi && nutscan_avail_avahi && thread[TYPE_AVAHI]) {
- pthread_join(thread[TYPE_AVAHI],NULL);
- }
-- if( allow_ipmi && nutscan_avail_ipmi ) {
-+ if( allow_ipmi && nutscan_avail_ipmi && thread[TYPE_IPMI]) {
- pthread_join(thread[TYPE_IPMI],NULL);
- }
- #endif /* HAVE_PTHREAD */
diff --git a/nut-2.6.5-unreachable.patch b/nut-2.6.5-unreachable.patch
deleted file mode 100644
index 3c9db41..0000000
--- a/nut-2.6.5-unreachable.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff -up nut-2.6.5/scripts/python/app/NUT-Monitor.unreachable nut-2.6.5/scripts/python/app/NUT-Monitor
---- nut-2.6.5/scripts/python/app/NUT-Monitor.unreachable 2012-07-31 19:38:56.000000000 +0200
-+++ nut-2.6.5/scripts/python/app/NUT-Monitor 2013-01-07 18:04:26.532531441 +0100
-@@ -674,6 +674,11 @@ class interface :
- self.gui_status_notification( _("Device '%s' not found on server") % self.__current_ups, "warning.png" )
- return
-
-+ if not self.__ups_handler.CheckUPSAvailable( self.__current_ups ):
-+ self.gui_status_message( _("UPS '{0}' is not reachable").format( self.__current_ups ) )
-+ self.gui_status_notification( _("UPS '{0}' is not reachable").format( self.__current_ups ), "warning.png" )
-+ return
-+
- self.__connected = True
- self.__widgets["ups_connect"].hide()
- self.__widgets["ups_disconnect"].show()
-diff -up nut-2.6.5/scripts/python/module/PyNUT.py.unreachable nut-2.6.5/scripts/python/module/PyNUT.py
---- nut-2.6.5/scripts/python/module/PyNUT.py.unreachable 2012-07-31 19:38:56.000000000 +0200
-+++ nut-2.6.5/scripts/python/module/PyNUT.py 2013-01-07 17:41:26.548440712 +0100
-@@ -158,6 +158,20 @@ available vars.
-
- return( ups_vars )
-
-+ def CheckUPSAvailable( self, ups="") :
-+ """ Check whether UPS is reachable
-+
-+Just tries to contact UPS with safe command.
-+The result is True (rechable) or False (unreachable)
-+ """
-+ self.__srv_handler.write( "LIST CMD %s\n" % ups )
-+ result = self.__srv_handler.read_until( "\n" )
-+ if result != "BEGIN LIST CMD %s\n" % ups :
-+ return False
-+
-+ self.__srv_handler.read_until( "END LIST CMD %s\n" % ups )
-+ return True
-+
- def GetUPSCommands( self, ups="" ) :
- """ Get all available commands for the specified UPS
-
diff --git a/nut-config.patch b/nut-config.patch
index 254e84b..f655eec 100644
--- a/nut-config.patch
+++ b/nut-config.patch
@@ -5,7 +5,7 @@ diff -Nuard nut-2.0.1.orig/conf/upsmon.conf nut-2.0.1/conf/upsmon.conf
#
# This user should not have write access to upsmon.conf.
#
--# RUN_AS_USER nutmon
+-# RUN_AS_USER nut
+# RUN_AS_USER ups
# --------------------------------------------------------------------------
diff --git a/nut.init b/nut.init
index ccacb32..bffdd21 100644
--- a/nut.init
+++ b/nut.init
@@ -25,7 +25,7 @@ case "$1" in
# Check if the service is already running?
if [ ! -f /var/lock/subsys/ups ]; then
show "Starting UPS drivers"
- daemon /lib/nut/upsdrvctl start
+ daemon /usr/sbin/upsdrvctl start
RETVALDRV=$?
msg_starting "UPS network daemon"
daemon /usr/sbin/upsd $UPSD_OPTIONS
@@ -42,7 +42,7 @@ case "$1" in
if [ -f /var/lock/subsys/ups ]; then
msg_stopping "UPS daemon"
/usr/sbin/upsd -c stop
- run_cmd "Stopping UPS drivers" /lib/nut/upsdrvctl stop
+ run_cmd "Stopping UPS drivers" /usr/sbin/upsdrvctl stop
rm -f /var/lock/subsys/ups
else
msg_not_running "UPS daemon"
@@ -56,8 +56,8 @@ case "$1" in
reload|force-reload)
if [ -f /var/lock/subsys/ups ]; then
show "Reloading UPS drivers"
- /lib/nut/upsdrvctl stop
- /lib/nut/upsdrvctl start
+ /usr/sbin/upsdrvctl stop
+ /usr/sbin/upsdrvctl start
[ $? -ne 0 ] && RETVAL=7
msg_reloading "UPS network daemon"
/usr/sbin/upsd -c reload
@@ -69,7 +69,7 @@ case "$1" in
;;
powerdown)
show "Switching the power off"; busy
- /lib/nut/upsdrvctl shutdown
+ /usr/sbin/upsdrvctl shutdown
sleep 60
fail
;;
diff --git a/systemd-sysconfig.patch b/systemd-sysconfig.patch
index 5b15044..2f543dc 100644
--- a/systemd-sysconfig.patch
+++ b/systemd-sysconfig.patch
@@ -22,8 +22,8 @@
PIDFile=@PIDPATH@/upsmon.pid
Type=forking
---- nut-2.6.5/configure.in~ 2012-08-06 14:37:36.000000000 +0200
-+++ nut-2.6.5/configure.in 2013-01-13 12:42:30.807862312 +0100
+--- nut-2.6.5/configure.ac~ 2012-08-06 14:37:36.000000000 +0200
++++ nut-2.6.5/configure.ac 2013-01-13 12:42:30.807862312 +0100
@@ -986,9 +986,8 @@
dnl prefix. This is needed for 'distcheck*' targets, otherwise
dnl files will try to get intalled to the actual system directories
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nut.git/commitdiff/c32c067c6322a4382963a809bdd5ab7bcd70dc1b
More information about the pld-cvs-commit
mailing list