diff --git a/lm_sensors.init b/lm_sensors.init index 51a0588..2a0705e 100755 --- a/lm_sensors.init +++ b/lm_sensors.init @@ -51,7 +51,7 @@ PSENSORS=/usr/bin/sensors . /etc/init.d/functions RETVAL=0 -prog="sensors" +prog="lm_sensors" start() { echo -n $"Starting $prog: " diff --git a/lm_sensors.spec b/lm_sensors.spec index 363af1e..ef01508 100644 --- a/lm_sensors.spec +++ b/lm_sensors.spec @@ -1,6 +1,6 @@ Name: lm_sensors Version: 2.8.7 -Release: 1 +Release: 2 URL: http://secure.netroedge.com/~lm78/ Source: http://secure.netroedge.com/~lm78/archive/lm_sensors-%{version}.tar.gz Source1: lm_sensors.sysconfig @@ -61,6 +61,7 @@ mv prog/init/README prog/init/README.initscripts # Remove userland kernel headers, belong in glibc-kernheaders. rm -rf $RPM_BUILD_ROOT%{_includedir}/linux +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/lm_sensors mkdir -p $RPM_BUILD_ROOT%{_initrddir} install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/lm_sensors @@ -68,10 +69,18 @@ install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/lm_sensors %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -fr $RPM_BUILD_ROOT -%post -p /sbin/ldconfig +%post +/sbin/ldconfig +/sbin/chkconfig --add lm_sensors %postun -p /sbin/ldconfig +%preun +if [ $1 = 0 ]; then + /sbin/chkconfig --del lm_sensors +fi + + %files %defattr(-,root,root) %doc BACKGROUND BUGS CHANGES CONTRIBUTORS COPYING doc INSTALL QUICKSTART README* TODO prog/init/* @@ -81,7 +90,7 @@ install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/lm_sensors %{_mandir}/man*/* %{_sbindir}/* %config %{_initrddir}/lm_sensors -%config %{_sysconfdir}/sysconfig/lm_sensors +%config(noreplace) %{_sysconfdir}/sysconfig/lm_sensors %files devel %defattr(-,root,root)