diff --git a/fancontrol.service b/fancontrol.service new file mode 100644 index 0000000..2cd6606 --- /dev/null +++ b/fancontrol.service @@ -0,0 +1,16 @@ + +[Unit] +Description=Start fan control, if configured +ConditionFileNotEmpty=/etc/fancontrol +After=lm_sensors.service +After=syslog.target + +[Service] +Type=simple +Restart=always +PIDFile=/var/run/fancontrol.pid +EnvironmentFile=/etc/sysconfig/lm_sensors +ExecStart=/usr/sbin/fancontrol + +[Install] +WantedBy=multi-user.target diff --git a/sensors.changes b/sensors.changes index 24f5ceb..ee92c50 100644 --- a/sensors.changes +++ b/sensors.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat May 18 11:58:47 UTC 2013 - werner@suse.com + +- Add fancontrol.service + ------------------------------------------------------------------- Fri Apr 5 12:06:46 UTC 2013 - idonmez@suse.com diff --git a/sensors.spec b/sensors.spec index 0f87217..4cc7562 100644 --- a/sensors.spec +++ b/sensors.spec @@ -30,6 +30,7 @@ Requires: modutils Source0: http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-%{version}.tar.bz2 Source1: lm_sensors.init Source2: baselibs.conf +Source3: fancontrol.service Patch1: lm_sensors-3.1.1-build.patch Patch2: lm_sensors-3.0.0-sensord-separate.patch Patch3: lm_sensors-3.0.0-sysconfig_metadata.patch @@ -168,6 +169,7 @@ make %{?_smp_mflags} PROG_EXTRA:=sensord BUILD_STATIC_LIB:=0 PREFIX=%{_prefix} M install -m 0755 %{S:1} $RPM_BUILD_ROOT/etc/init.d/lm_sensors ln -sf /etc/init.d/lm_sensors $RPM_BUILD_ROOT/usr/sbin/rclm_sensors install -D -m 0644 prog/init/lm_sensors.service %{buildroot}%{_unitdir}/lm_sensors.service + install -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/fancontrol.service %pre %service_add_pre lm_sensors.service @@ -211,6 +213,7 @@ fi %files %defattr(-,root,root) %{_unitdir}/lm_sensors.service +%{_unitdir}/fancontrol.service /etc/init.d/lm_sensors /usr/sbin/rclm_sensors /usr/bin/*