Blame SOURCES/bz1236395-1-fence_scsi-fence_scsi_check.pl-link.patch

554a6e
diff -uNr a/agents/Makefile.am b/agents/Makefile.am
554a6e
--- a/agents/Makefile.am	2018-06-18 12:14:35.000000000 +0200
554a6e
+++ b/agents/Makefile.am	2018-06-28 12:50:17.193565151 +0200
554a6e
@@ -52,7 +52,7 @@
554a6e
 
554a6e
 if BUILD_FENCE_SCSI
554a6e
 scsidatadir			= $(CLUSTERDATA)
554a6e
-scsidata_SCRIPTS		= scsi/fence_scsi_check scsi/fence_scsi_check_hardreboot
554a6e
+scsidata_SCRIPTS		= scsi/fence_scsi_check scsi/fence_scsi_check_hardreboot scsi/fence_scsi_check.pl
554a6e
 endif
554a6e
 
554a6e
 FENCE_TEST_ARGS			= \
554a6e
@@ -72,6 +72,9 @@
554a6e
 		-e 's#@clustervarrun@#${CLUSTERVARRUN}#g' \
554a6e
 	> $@
554a6e
 
554a6e
+scsi/fence_scsi_check.pl: scsi/fence_scsi
554a6e
+	cp $^ $@
554a6e
+
554a6e
 scsi/fence_scsi_check: scsi/fence_scsi
554a6e
 	cp $^ $@
554a6e
 
554a6e
diff -uNr a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py
554a6e
--- a/agents/scsi/fence_scsi.py	2018-06-18 12:14:35.000000000 +0200
554a6e
+++ b/agents/scsi/fence_scsi.py	2018-06-28 12:34:24.319178921 +0200
554a6e
@@ -430,7 +430,9 @@
554a6e
 ignored when used with the -k option."
554a6e
 
554a6e
 	#fence_scsi_check
554a6e
-	if os.path.basename(sys.argv[0]) == "fence_scsi_check":
554a6e
+	if os.path.basename(sys.argv[0]) == "fence_scsi_check.pl":
554a6e
+		sys.exit(scsi_check())
554a6e
+	elif os.path.basename(sys.argv[0]) == "fence_scsi_check":
554a6e
 		sys.exit(scsi_check())
554a6e
 	elif os.path.basename(sys.argv[0]) == "fence_scsi_check_hardreboot":
554a6e
 		sys.exit(scsi_check(True))