Use upstream's systemd service

The source project formerly did not include a systemd unit file.
It does now, so target.service can be removed.
This commit is contained in:
Matt Coleman 2020-06-25 18:44:51 -04:00
parent 86c7db490f
commit 3efce2a821
2 changed files with 1 additions and 17 deletions

View File

@ -10,7 +10,6 @@ Version: 2.1.fb69
Release: 9%{?dist}
URL: https://github.com/open-iscsi/%{oname}
Source: %{url}/archive/v%{version}/%{oname}-%{version}.tar.gz
Source1: target.service
Patch0: 0001-disable-xen_pvscsi.patch
BuildArch: noarch
%if %{with apidocs}
@ -91,7 +90,7 @@ mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_sysconfdir}/target/backup
mkdir -p %{buildroot}%{_localstatedir}/target/pr
mkdir -p %{buildroot}%{_localstatedir}/target/alua
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/target.service
install -m 644 systemd/target.service %{buildroot}%{_unitdir}/target.service
install -m 644 doc/targetctl.8 %{buildroot}%{_mandir}/man8/
install -m 644 doc/saveconfig.json.5 %{buildroot}%{_mandir}/man5/

View File

@ -1,15 +0,0 @@
[Unit]
Description=Restore LIO kernel target configuration
Requires=sys-kernel-config.mount
After=sys-kernel-config.mount network.target local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/targetctl restore
ExecStop=/usr/bin/targetctl clear
SyslogIdentifier=target
[Install]
WantedBy=multi-user.target