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: Chris Leech <cleech@redhat.com>
|
||||
Date: Tue, 22 Jan 2013 15:04:14 -0800
|
||||
Subject: use systemctl to start iscsid
|
||||
Date: Thu Feb 21 21:05:39 PST 2013
|
||||
Subject: disable iscsid.startup from iscsiadm, prefer systemd socket activation
|
||||
|
||||
---
|
||||
etc/iscsid.conf | 2 +-
|
||||
@ -16,7 +16,7 @@ index ac1d231..5851fa5 100644
|
||||
#
|
||||
# Default for Fedora and RHEL. (uncomment to activate).
|
||||
-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).
|
||||
# iscsid.startup = /sbin/iscsid
|
||||
|
@ -7,7 +7,7 @@
|
||||
Summary: iSCSI daemon and utility programs
|
||||
Name: iscsi-initiator-utils
|
||||
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
|
||||
Source1: iscsiuio-%{iscsiuio_version}.tar.gz
|
||||
Source4: 04-iscsi
|
||||
@ -56,7 +56,7 @@ Group: System Environment/Daemons
|
||||
License: GPLv2+
|
||||
URL: http://www.open-iscsi.org
|
||||
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
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
@ -123,15 +123,7 @@ cd ..
|
||||
|
||||
|
||||
%build
|
||||
cd utils/open-isns
|
||||
./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
|
||||
make OPTFLAGS="%{optflags} -DUSE_KMOD -lkmod"
|
||||
|
||||
cd iscsiuio
|
||||
chmod u+x configure
|
||||
@ -200,29 +192,26 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
/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
|
||||
echo "InitiatorName=`/sbin/iscsi-iname`" > %{_sysconfdir}/iscsi/initiatorname.iscsi
|
||||
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
|
||||
|
||||
%systemd_post iscsi.service iscsid.service iscsiuio.service
|
||||
|
||||
# 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
|
||||
%preun
|
||||
%systemd_preun iscsi.service iscsid.service iscsiuio.service iscsid.socket iscsiuio.socket
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%systemd_postun
|
||||
|
||||
%preun
|
||||
%systemd_preun iscsi.service iscsid.service iscsiuio.service
|
||||
|
||||
%triggerun -- iscsi-initiator-utils < 6.2.0.873-1
|
||||
# Save the current service runlevel info
|
||||
# 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 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
|
||||
/sbin/chkconfig --del iscsid >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del iscsi >/dev/null 2>&1 || :
|
||||
@ -271,6 +264,10 @@ fi
|
||||
%{_includedir}/libiscsi.h
|
||||
|
||||
%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
|
||||
- Fix the postun script to not use ldconfig as the interpreter
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user