build with libkmod support, instead of calling out to modprobe
enable socket activation by default
This commit is contained in:
parent
31b81b6c4f
commit
3c948fa707
@ -1,7 +1,7 @@
|
|||||||
From c3d2b8f3de5b6161845304cf46982d2c5a9918b6 Mon Sep 17 00:00:00 2001
|
From c3d2b8f3de5b6161845304cf46982d2c5a9918b6 Mon Sep 17 00:00:00 2001
|
||||||
From: Chris Leech <cleech@redhat.com>
|
From: Chris Leech <cleech@redhat.com>
|
||||||
Date: Tue, 22 Jan 2013 15:04:14 -0800
|
Date: Thu Feb 21 21:05:39 PST 2013
|
||||||
Subject: use systemctl to start iscsid
|
Subject: disable iscsid.startup from iscsiadm, prefer systemd socket activation
|
||||||
|
|
||||||
---
|
---
|
||||||
etc/iscsid.conf | 2 +-
|
etc/iscsid.conf | 2 +-
|
||||||
@ -16,7 +16,7 @@ index ac1d231..5851fa5 100644
|
|||||||
#
|
#
|
||||||
# Default for Fedora and RHEL. (uncomment to activate).
|
# Default for Fedora and RHEL. (uncomment to activate).
|
||||||
-iscsid.startup = /etc/rc.d/init.d/iscsid force-start
|
-iscsid.startup = /etc/rc.d/init.d/iscsid force-start
|
||||||
+iscsid.startup = /bin/systemctl start iscsid.service
|
+#iscsid.startup = /bin/systemctl start iscsid.service
|
||||||
#
|
#
|
||||||
# Default for upstream open-iscsi scripts (uncomment to activate).
|
# Default for upstream open-iscsi scripts (uncomment to activate).
|
||||||
# iscsid.startup = /sbin/iscsid
|
# iscsid.startup = /sbin/iscsid
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
Summary: iSCSI daemon and utility programs
|
Summary: iSCSI daemon and utility programs
|
||||||
Name: iscsi-initiator-utils
|
Name: iscsi-initiator-utils
|
||||||
Version: 6.%{open_iscsi_version}.%{open_iscsi_build}
|
Version: 6.%{open_iscsi_version}.%{open_iscsi_build}
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Source0: http://www.open-iscsi.org/bits/open-iscsi-%{open_iscsi_version}-%{open_iscsi_build}.tar.gz
|
Source0: http://www.open-iscsi.org/bits/open-iscsi-%{open_iscsi_version}-%{open_iscsi_build}.tar.gz
|
||||||
Source1: iscsiuio-%{iscsiuio_version}.tar.gz
|
Source1: iscsiuio-%{iscsiuio_version}.tar.gz
|
||||||
Source4: 04-iscsi
|
Source4: 04-iscsi
|
||||||
@ -56,7 +56,7 @@ Group: System Environment/Daemons
|
|||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://www.open-iscsi.org
|
URL: http://www.open-iscsi.org
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: openssl-devel flex bison python-devel doxygen glibc-static
|
BuildRequires: openssl-devel flex bison python-devel doxygen glibc-static kmod-devel
|
||||||
# For dir ownership
|
# For dir ownership
|
||||||
Requires(post): systemd
|
Requires(post): systemd
|
||||||
Requires(preun): systemd
|
Requires(preun): systemd
|
||||||
@ -123,15 +123,7 @@ cd ..
|
|||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
cd utils/open-isns
|
make OPTFLAGS="%{optflags} -DUSE_KMOD -lkmod"
|
||||||
./configure --with-security=no
|
|
||||||
make OPTFLAGS="%{optflags}"
|
|
||||||
cd ../../
|
|
||||||
make OPTFLAGS="%{optflags}" -C utils/sysdeps
|
|
||||||
make OPTFLAGS="%{optflags}" -C utils/fwparam_ibft
|
|
||||||
make OPTFLAGS="%{optflags}" -C usr
|
|
||||||
make OPTFLAGS="%{optflags}" -C utils
|
|
||||||
make OPTFLAGS="%{optflags}" -C libiscsi
|
|
||||||
|
|
||||||
cd iscsiuio
|
cd iscsiuio
|
||||||
chmod u+x configure
|
chmod u+x configure
|
||||||
@ -200,29 +192,26 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
if [ "$1" -eq "1" ]; then
|
|
||||||
|
%systemd_post iscsi.service iscsid.service iscsiuio.service iscsid.socket iscsiuio.socket
|
||||||
|
|
||||||
|
if [ $1 -eq 1 ]; then
|
||||||
if [ ! -f %{_sysconfdir}/iscsi/initiatorname.iscsi ]; then
|
if [ ! -f %{_sysconfdir}/iscsi/initiatorname.iscsi ]; then
|
||||||
echo "InitiatorName=`/sbin/iscsi-iname`" > %{_sysconfdir}/iscsi/initiatorname.iscsi
|
echo "InitiatorName=`/sbin/iscsi-iname`" > %{_sysconfdir}/iscsi/initiatorname.iscsi
|
||||||
fi
|
fi
|
||||||
|
# enable socket activation and persistant session startup by default
|
||||||
|
/bin/systemctl enable iscsi.service >/dev/null 2>&1 || :
|
||||||
|
/bin/systemctl enable iscsid.socket >/dev/null 2>&1 || :
|
||||||
|
/bin/systemctl enable iscsiuio.socket >/dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%systemd_post iscsi.service iscsid.service iscsiuio.service
|
%preun
|
||||||
|
%systemd_preun iscsi.service iscsid.service iscsiuio.service iscsid.socket iscsiuio.socket
|
||||||
# To make sure iscsid autostart works when upgrading from a version which
|
|
||||||
# did not have this in its config file
|
|
||||||
if ! grep -q 'iscsid\.startup' %{_sysconfdir}/iscsi/iscsid.conf; then
|
|
||||||
echo -e "\n\n# For iscsid autostart" \
|
|
||||||
"\niscsid.startup = /etc/rc.d/init.d/iscsid force-start" >> \
|
|
||||||
%{_sysconfdir}/iscsi/iscsid.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%systemd_postun
|
%systemd_postun
|
||||||
|
|
||||||
%preun
|
|
||||||
%systemd_preun iscsi.service iscsid.service iscsiuio.service
|
|
||||||
|
|
||||||
%triggerun -- iscsi-initiator-utils < 6.2.0.873-1
|
%triggerun -- iscsi-initiator-utils < 6.2.0.873-1
|
||||||
# Save the current service runlevel info
|
# Save the current service runlevel info
|
||||||
# User must manually run systemd-sysv-convert --apply iscsid
|
# User must manually run systemd-sysv-convert --apply iscsid
|
||||||
@ -231,6 +220,10 @@ fi
|
|||||||
/usr/bin/systemd-sysv-convert --save iscsi >/dev/null 2>&1 ||:
|
/usr/bin/systemd-sysv-convert --save iscsi >/dev/null 2>&1 ||:
|
||||||
/usr/bin/systemd-sysv-convert --save iscsid >/dev/null 2>&1 ||:
|
/usr/bin/systemd-sysv-convert --save iscsid >/dev/null 2>&1 ||:
|
||||||
|
|
||||||
|
# enable socket activation
|
||||||
|
/bin/systemctl enable iscsid.socket >/dev/null 2>&1 || :
|
||||||
|
/bin/systemctl enable iscsiuio.socket >/dev/null 2>&1 || :
|
||||||
|
|
||||||
# Run these because the SysV package being removed won't do them
|
# Run these because the SysV package being removed won't do them
|
||||||
/sbin/chkconfig --del iscsid >/dev/null 2>&1 || :
|
/sbin/chkconfig --del iscsid >/dev/null 2>&1 || :
|
||||||
/sbin/chkconfig --del iscsi >/dev/null 2>&1 || :
|
/sbin/chkconfig --del iscsi >/dev/null 2>&1 || :
|
||||||
@ -271,6 +264,10 @@ fi
|
|||||||
%{_includedir}/libiscsi.h
|
%{_includedir}/libiscsi.h
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 21 2013 Chris Leech <cleech@redhat.com> - 6.2.0.873-4
|
||||||
|
- build with libkmod support, instead of calling out to modprobe
|
||||||
|
- enable socket activation by default
|
||||||
|
|
||||||
* Thu Jan 24 2013 Kalev Lember <kalevlember@gmail.com> - 6.2.0.873-3
|
* Thu Jan 24 2013 Kalev Lember <kalevlember@gmail.com> - 6.2.0.873-3
|
||||||
- Fix the postun script to not use ldconfig as the interpreter
|
- Fix the postun script to not use ldconfig as the interpreter
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user