Accepting request 313783 from home:bmwiedemann:branches:Base:System

fix tgtd start by giving tgtd time to open the socket (bnc#934642)
  and use bash to run multiple programs in ExecStartPost

OBS-URL: https://build.opensuse.org/request/show/313783
OBS-URL: https://build.opensuse.org/package/show/Base:System/tgt?expand=0&rev=28
This commit is contained in:
Lee Duncan 2015-06-26 15:55:34 +00:00 committed by Git OBS Bridge
parent 8872ea4d6b
commit be7c4d23bf
3 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jun 26 06:14:44 UTC 2015 - bwiedemann@suse.com
- fix tgtd start by giving tgtd time to open the socket (bnc#934642)
and use bash to run multiple programs in ExecStartPost
-------------------------------------------------------------------
Tue Sep 2 19:34:55 CEST 2014 - mls@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package tgt
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -70,7 +70,7 @@ Authors:
%install
%{__make} DESTDIR=%{buildroot} docdir=%_docdir/%{name} install
install -vD -m 755 %{S:1} %{buildroot}/%{_unitdir}/%{name}d.service
install -vD -m 644 %{S:1} %{buildroot}/%{_unitdir}/%{name}d.service
install -vD %{S:3} %{buildroot}/etc/sysconfig/SuSEfirewall2.d/services/tgt
ln -sf service %{buildroot}/usr/sbin/rc%{name}

View File

@ -6,7 +6,7 @@ After=network.target
Type=forking
User=root
ExecStart=/usr/sbin/tgtd
ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -v offline ; /usr/sbin/tgt-admin -e -c /etc/tgt/targets.conf ; /usr/sbin/tgtadm --op update --mode sys --name State -v ready
ExecStartPost=/bin/bash -c "sleep 0.5 ; /usr/sbin/tgtadm --op update --mode sys --name State -v offline ; /usr/sbin/tgt-admin -e -c /etc/tgt/targets.conf ; /usr/sbin/tgtadm --op update --mode sys --name State -v ready"
ExecStopPre=/usr/sbin/tgt-admin --update ALL -c /dev/null
ExecStop=-/usr/sbin/tgtadm --op delete --mode system