- Adding i2c-dev auto-load in th %%post and modules-load.d (#913203)

This commit is contained in:
Jaromir Capik 2015-10-08 18:03:35 +02:00
parent 88002e4b3e
commit f003b70b66

View File

@ -6,7 +6,7 @@
Name: i2c-tools
Version: 3.1.0
Release: 14%{?dist}
Release: 15%{?dist}
Summary: A heterogeneous set of I2C tools for Linux
Group: Applications/System
License: GPLv2+
@ -96,6 +96,18 @@ for (( i = 0 ; i < 8 ; i++ )) do
echo "i2c-$i" >> $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes
done
# auto-load i2c-dev after reboot
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modules-load.d
echo 'i2c-dev' > $RPM_BUILD_ROOT%{_prefix}/lib/modules-load.d/%{name}.conf
%post
# load i2c-dev after the first install
if [ "$1" = 1 ] ; then
/usr/sbin/modprobe i2c-dev
fi
exit 0
%files
%doc CHANGES COPYING README
@ -107,6 +119,7 @@ done
%{_mandir}/man8/*.8.gz
%exclude %{_mandir}/man8/eepro*
%exclude %{_mandir}/man8/i2c-stub-from-dump.8.gz
%{_prefix}/lib/modules-load.d/%{name}.conf
%files eepromer
%doc eepromer/README*
@ -127,6 +140,9 @@ done
%changelog
* Thu Oct 08 2015 Jaromir Capik <jcapik@redhat.com> - 3.1.0-15
- Adding i2c-dev auto-load in th %%post and modules-load.d (#913203)
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild