diff --git a/sensors.changes b/sensors.changes index c5c0267..8e9a403 100644 --- a/sensors.changes +++ b/sensors.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Thu Jul 3 11:25:08 UTC 2014 - jdelvare@suse.com + +- Actually create the sensord service configuration file from the + template (bnc#882719). + +------------------------------------------------------------------- +Wed Jul 2 12:22:44 UTC 2014 - jdelvare@suse.com + +- Add pre/post hooks for sensord service. +- Add sysconfig template for sensord service (bnc#882719). + ------------------------------------------------------------------- Tue Jan 28 09:08:45 CET 2014 - jdelvare@suse.de diff --git a/sensors.spec b/sensors.spec index c7d21f5..65f5c27 100644 --- a/sensors.spec +++ b/sensors.spec @@ -29,6 +29,7 @@ License: GPL-2.0+ Group: System/Monitoring Requires: modutils Source0: http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-%{version}.tar.bz2 +Source1: sysconfig.sensord Source2: baselibs.conf Patch1: lm_sensors-3.1.1-build.patch Patch2: lm_sensors-3.0.0-sensord-separate.patch @@ -52,6 +53,7 @@ Summary: Hardware health monitoring daemon License: GPL-2.0+ Group: System/Monitoring Provides: sensors:/usr/sbin/sensord +Requires(pre): %fillup_prereq %description -n sensord sensord is a daemon that can be used to periodically log sensor @@ -109,9 +111,10 @@ make %{?_smp_mflags} PROG_EXTRA:=sensord BUILD_STATIC_LIB:=0 PREFIX=%{_prefix} M cp -a COPYING $RPM_BUILD_ROOT/%{_docdir}/sensord/ chmod -R u+rwX,g+rX,o+rX $RPM_BUILD_ROOT/%{_docdir}/sensors/ $RPM_BUILD_ROOT/%{_docdir}/sensord/ chmod 0755 $RPM_BUILD_ROOT/%{_libdir}/libsensors.so.* - mkdir -p $RPM_BUILD_ROOT/%{_unitdir} + mkdir -p $RPM_BUILD_ROOT/%{_unitdir} $RPM_BUILD_ROOT/%{_localstatedir}/adm/fillup-templates cp -a prog/init/*.service $RPM_BUILD_ROOT/%{_unitdir}/ ln -sf /sbin/service %{buildroot}/usr/sbin/rclm_sensors + cp -a %{SOURCE1} $RPM_BUILD_ROOT/%{_localstatedir}/adm/fillup-templates %pre %service_add_pre lm_sensors.service @@ -146,6 +149,19 @@ fi %postun %service_del_postun lm_sensors.service +%pre -n sensord +%service_add_pre sensord.service + +%post -n sensord +%service_add_post sensord.service +%{fillup_only -n sensord} + +%preun -n sensord +%service_del_preun sensord.service + +%postun -n sensord +%service_del_postun sensord.service + %post -n libsensors4 -p /sbin/ldconfig %postun -n libsensors4 -p /sbin/ldconfig @@ -184,6 +200,7 @@ fi %files -n sensord %defattr(-,root,root) %{_unitdir}/sensord.service +%{_localstatedir}/adm/fillup-templates/sysconfig.sensord /usr/sbin/sensord %dir %{_docdir}/sensord %doc %{_docdir}/sensord/COPYING diff --git a/sysconfig.sensord b/sysconfig.sensord new file mode 100644 index 0000000..c441446 --- /dev/null +++ b/sysconfig.sensord @@ -0,0 +1,19 @@ +## Path: Hardware/Sensors Monitoring Daemon +## Description: Configuration for the hardware sensors monitoring daemon (sensord) +## ServiceRestart: sensord + +## Type: string +## Default: "1m" +# +# Interval between scanning for alarms. Use suffix "s" for seconds, "m" for +# minutes, "h" for hours. 0 turns off scanning for alarms. +# +INTERVAL="1m" + +## Type: string +## Default: "20m" +# +# Interval between logging. Use suffix "s" for seconds, "m" for minutes, "h" +# for hours. 0 turns off logging. +# +LOG_INTERVAL="20m"