FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 07-20-2010, 09:44 AM
Chris Cheney
 
Default Bug#589716: tgtd target will not start unless it's configured with "allow-in-use yes"

Package: tgt
Version: 1:1.0.4-1
Severity: important

"tgt-admin will not start a target unless we specify the "allow-in-use
yes" directive in the target declaration. It complains that the device
is in use, although I am positive it is not. Specifying "allow-in-use
yes" is not recommended, and doing so is not really satisfactory."

This appears to have been caused by a faulty system call which appears
to be corrected by the below patch.

Thanks,

Chris

--- tgt-1.0.4/scripts/tgt-admin 2010-04-29 01:16:34.000000000 -0500
+++ tgt-1.0.4/scripts/tgt-admin 2010-07-20 04:32:55.603760363 -0500
@@ -1166,7 +1166,7 @@
# Check if userspace uses this device
my $lsof_check = check_exe("lsof");
if ($lsof_check ne 1) {
- system("lsof $backing_store &>/dev/null");
+ system("lsof $backing_store > /dev/null 2>&1");
my $exit_value = $? >> 8;
if ($exit_value eq 0) {
execute("# Device $backing_store is used (already tgtd target?).");





--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1279619054.17382.6.camel@x200">http://lists.debian.org/1279619054.17382.6.camel@x200
 
Old 07-21-2010, 12:52 AM
Ben Hutchings
 
Default Bug#589716: tgtd target will not start unless it's configured with "allow-in-use yes"

On Tue, 2010-07-20 at 04:44 -0500, Chris Cheney wrote:
> Package: tgt
> Version: 1:1.0.4-1
> Severity: important
>
> "tgt-admin will not start a target unless we specify the "allow-in-use
> yes" directive in the target declaration. It complains that the device
> is in use, although I am positive it is not. Specifying "allow-in-use
> yes" is not recommended, and doing so is not really satisfactory."
>
> This appears to have been caused by a faulty system call which appears
> to be corrected by the below patch.
[...]

Indeed, the '&>' operator is a bash extension and this doesn't work if
you have dash as /bin/sh.

Ben.

--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
 

Thread Tools




All times are GMT. The time now is 06:24 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org