File 0016-tcm_node-Check-for-target_core_mod.patch of Package lio-utils.216
From be58820def00a41465f6f6d49a649f4fa8450858 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 1 Feb 2013 14:04:53 +0100
Subject: tcm_node: Check for target_core_mod
target_core_mod needs to be loaded, otherwise all functions
will fail.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
tcm-py/tcm_node.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tcm-py/tcm_node.py b/tcm-py/tcm_node.py
index e6913fd..527bc0a 100755
--- a/tcm-py/tcm_node.py
+++ b/tcm-py/tcm_node.py
@@ -726,6 +726,8 @@ def dispatcher(option, opt_str, value, parser, orig_callback):
orig_callback(*value)
def main():
+ if not os.path.isdir(tcm_root):
+ tcm_err("target_core_mod module not loaded")
parser = OptionParser(version=tcm_version())
--
1.8.1.4