File 0030-target.service-Fixup-service-file.patch of Package lio-utils.216

From b24ba816dd2c8bed0de942fb11907f39689148f9 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Thu, 15 May 2014 10:12:47 +0200
Subject: target.service: Fixup service file

The systemd service syntax doesn't support redirection, so we
need to use the '--file' option for tcm_dump and lio_dump.
Also ExecStopPre doesn't exist, so we need to reshuffle the
ExecStop calls.

References: bnc#876881

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 scripts/target.service | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/scripts/target.service b/scripts/target.service
index 212e9a2..701bbcb 100644
--- a/scripts/target.service
+++ b/scripts/target.service
@@ -4,16 +4,16 @@ Description="Generic Target Mode service"
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStart="/etc/target/tcm_start.sh"
-ExecStart="/etc/target/lio_start.sh"
-ExecStartPost=-"/etc/target/tcm_setup.sh"
-ExecStartPost=-"/etc/target/lio_setup.sh"
+ExecStart=/etc/target/tcm_start.sh
+ExecStart=/etc/target/lio_start.sh
+ExecStartPost=-/etc/target/tcm_setup.sh
+ExecStartPost=-/etc/target/lio_setup.sh
 
-ExecStopPre="/usr/sbin/lio_dump --stdout > /etc/target/lio_setup.sh"
-ExecStopPre="/usr/sbin/tcm_setup --stdout > /etc/target/tcm_setup.sh"
-ExecStop="/usr/sbin/tcm_fabric --unloadall"
-ExecStop="/usr/sbin/lio_node --unload"
-ExecStopPost="/usr/sbin/tcm_node --unload"
+ExecStop=/usr/sbin/lio_dump --file /etc/target/lio_setup.sh
+ExecStop=/usr/sbin/tcm_dump --file /etc/target/tcm_setup.sh
+ExecStopPost=/usr/sbin/tcm_fabric --unloadall
+ExecStopPost=/usr/sbin/lio_node --unload
+ExecStopPost=/usr/sbin/tcm_node --unload
 
 [Install]
 WantedBy=sysinit.target
-- 
1.7.12.4

openSUSE Build Service is sponsored by