File lio-utils-ensure-lio_setup-ends-with-success.patch of Package lio-utils.13457

From: Lee Duncan <lduncan@suse.com>
Date: Sun Nov 24 13:15:42 PST 2019
Subject: [PATCHv2] lio-utils: ensure lio_setup ends with success

Changes since V1:
 * move the "exit 0" to the end of lio_target_configfs_dump(),
   so we only get one "exit 0" per file

Put an "exit 0" at the of output from lio_dump, so that running
the script will end with success, even if the last command ran
before this failed. Note that this command is used to create
the lio_setup.sh file, normally kept in /etc/target, and which
is used to save and restore LIO state.
---
 lio-py/lio_dump.py |    3 +++
 1 file changed, 3 insertions(+)

--- a/lio-py/lio_dump.py
+++ b/lio-py/lio_dump.py
@@ -241,6 +241,9 @@ def lio_target_configfs_dump(option, opt
 
 #		lio_target_del_iqn(None, None, iqn, None)
 
+	# ensure script ends with success
+	print "exit 0"
+
 	return
 
 def lio_backup_to_file(option, opt_str, value, parser):
openSUSE Build Service is sponsored by