From be7c4d23bfc4bd83d55a97b3f08352c46fc934eea4b3a12725e0e0e830b0efb8 Mon Sep 17 00:00:00 2001 From: Lee Duncan Date: Fri, 26 Jun 2015 15:55:34 +0000 Subject: [PATCH] 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 --- tgt.changes | 6 ++++++ tgt.spec | 4 ++-- tgtd.service | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tgt.changes b/tgt.changes index 6eea1fc..8b591fd 100644 --- a/tgt.changes +++ b/tgt.changes @@ -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 diff --git a/tgt.spec b/tgt.spec index 8d43dd9..04a7856 100644 --- a/tgt.spec +++ b/tgt.spec @@ -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} diff --git a/tgtd.service b/tgtd.service index e0dd841..daa1c2a 100644 --- a/tgtd.service +++ b/tgtd.service @@ -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