1
From: Chris Cheney <ccheney@debian.org>
2
Date: Tue, 20 Jul 2010 04:44:14 -0500
3
Subject: Bug#589716: tgtd target will not start unless it's configured with
10
"tgt-admin will not start a target unless we specify the "allow-in-use
11
yes" directive in the target declaration. It complains that the device
12
is in use, although I am positive it is not. Specifying "allow-in-use
13
yes" is not recommended, and doing so is not really satisfactory."
15
This appears to have been caused by a faulty system call which appears
16
to be corrected by the below patch.
22
--- tgt-1.0.4/scripts/tgt-admin 2010-04-29 01:16:34.000000000 -0500
23
+++ tgt-1.0.4/scripts/tgt-admin 2010-07-20 04:32:55.603760363 -0500
25
# Check if userspace uses this device
26
my $lsof_check = check_exe("lsof");
27
if ($lsof_check ne 1) {
28
- system("lsof $backing_store &>/dev/null");
29
+ system("lsof $backing_store > /dev/null 2>&1");
30
my $exit_value = $? >> 8;
31
if ($exit_value eq 0) {
32
execute("# Device $backing_store is used (already tgtd target?).");