added chkconfig and noreplace
This commit is contained in:
parent
e30dc345ec
commit
6a957e099a
@ -51,7 +51,7 @@ PSENSORS=/usr/bin/sensors
|
||||
. /etc/init.d/functions
|
||||
|
||||
RETVAL=0
|
||||
prog="sensors"
|
||||
prog="lm_sensors"
|
||||
|
||||
start() {
|
||||
echo -n $"Starting $prog: "
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user