added chkconfig and noreplace

This commit is contained in:
Harald Hoyer 2004-10-14 14:05:56 +00:00
parent e30dc345ec
commit 6a957e099a
2 changed files with 13 additions and 4 deletions

View File

@ -51,7 +51,7 @@ PSENSORS=/usr/bin/sensors
. /etc/init.d/functions
RETVAL=0
prog="sensors"
prog="lm_sensors"
start() {
echo -n $"Starting $prog: "

View File

@ -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)