[scsi-target-utils/f17] fix `tgt-admin --update` so that it uses /etc/tgt/tgtd.conf

Pádraig Brady pbrady at fedoraproject.org
Wed Nov 7 13:59:10 UTC 2012


commit 3cb2f5b65450db03a1ebe0ef022bae2d9b083665
Author: Pádraig Brady <P at draigBrady.com>
Date:   Wed Nov 7 12:41:27 2012 +0000

    fix `tgt-admin --update` so that it uses /etc/tgt/tgtd.conf
    
    Ideally this should be decoupled by reading the
    /etc/sysconfig value, but for now we hardcode the
    new default in tgt-admin.

 scsi-target-utils-default-config.patch |   37 ++++++++++++++++++++++++++++++++
 scsi-target-utils.spec                 |    7 +++++-
 2 files changed, 43 insertions(+), 1 deletions(-)
---
diff --git a/scsi-target-utils-default-config.patch b/scsi-target-utils-default-config.patch
new file mode 100644
index 0000000..2d88a10
--- /dev/null
+++ b/scsi-target-utils-default-config.patch
@@ -0,0 +1,37 @@
+Reset the default config used with `tgt-admin --update` etc.
+
+Ideally this should be decoupled by reading the
+/etc/sysconfig value, but for now this will do.
+
+diff -Naur tgt-1.0.32.orig/scripts/initd.sample tgt-1.0.32/scripts/initd.sample
+--- tgt-1.0.32.orig/scripts/initd.sample	2012-09-30 22:39:21.000000000 +0000
++++ tgt-1.0.32/scripts/initd.sample	2012-11-07 12:28:53.544906721 +0000
+@@ -2,7 +2,7 @@
+ 
+ # This is an example init.d script for stopping/starting/reconfiguring tgtd.
+ 
+-TGTD_CONFIG=/etc/tgt/targets.conf
++TGTD_CONFIG=/etc/tgt/tgtd.conf
+ 
+ TASK=$1
+ 
+diff -Naur tgt-1.0.32.orig/scripts/tgt-admin tgt-1.0.32/scripts/tgt-admin
+--- tgt-1.0.32.orig/scripts/tgt-admin	2012-11-07 12:26:17.549607174 +0000
++++ tgt-1.0.32/scripts/tgt-admin	2012-11-07 12:29:31.328979226 +0000
+@@ -1,6 +1,6 @@
+ #!/usr/bin/perl
+ #
+-# This tools parses /etc/tgt/targets.conf file and configures tgt
++# This tools parses /etc/tgt/tgtd.conf file and configures tgt
+ #
+ # Author:  Tomasz Chmielewski
+ # License: GPLv2
+@@ -11,7 +11,7 @@
+ use Getopt::Long;
+ 
+ # Our config file
+-my $configfile = "/etc/tgt/targets.conf";
++my $configfile = "/etc/tgt/tgtd.conf";
+ 
+ sub usage {
+ 	print <<EOF;
diff --git a/scsi-target-utils.spec b/scsi-target-utils.spec
index 59321f0..b6c6efb 100644
--- a/scsi-target-utils.spec
+++ b/scsi-target-utils.spec
@@ -4,7 +4,7 @@
 
 Name:           scsi-target-utils
 Version:        1.0.24
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        The SCSI target daemon and utility programs
 
 Group:          System Environment/Daemons
@@ -20,6 +20,7 @@ Patch0:         scsi-target-utils-redhatify-docs.patch
 Patch1:         scsi-target-utils-remove-xsltproc-check.patch
 Patch2:         scsi-target-utils-dynamic-link-iser.patch
 Patch3:         scsi-target-utils-include-dirs.patch
+Patch4:         scsi-target-utils-default-config.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -53,6 +54,7 @@ Extensions for RDMA (ISER) to scsi-target-utils.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %build
 %{__sed} -i -e 's|-g -O2 -Wall|%{optflags}|' Makefile
@@ -129,6 +131,9 @@ fi
 
 
 %changelog
+* Wed Nov  7 2012 Pádraig Brady <P at draigBrady.com> - 1.0.24-6
+- Fix `tgt-admin --update` so that it uses /etc/tgt/tgtd.conf
+
 * Thu Sep 27 2012 Pádraig Brady <P at draigBrady.com> - 1.0.24-5
 - Allow config files to include (all files from) directories
 - Support conf.d/ on upgrade even with modified targets.conf


More information about the scm-commits mailing list