~ubuntu-branches/ubuntu/precise/tgt/precise

« back to all changes in this revision

Viewing changes to debian/patches/fix-tgt-admin-bashism

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-09-10 16:19:59 UTC
  • mfrom: (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20100910161959-mrtxqtgq5atinfp5
Tags: 1:1.0.4-2ubuntu1
* Merge from debian unstable.  Remaining changes:
  - debian/upstart: Add upstart job.
  - Dropped:
    + debian/patches/scripts-tgt-admin: Use debian's instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
4
 "allow-in-use yes"
 
5
 
 
6
Package: tgt
 
7
Version: 1:1.0.4-1
 
8
Severity: important
 
9
 
 
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."
 
14
 
 
15
This appears to have been caused by a faulty system call which appears
 
16
to be corrected by the below patch.
 
17
 
 
18
Thanks,
 
19
 
 
20
Chris
 
21
 
 
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
 
24
@@ -1166,7 +1166,7 @@
 
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?).");