[PATCH] Allow help even when there is no config file ...

Richard Sharpe realrichardsharpe
Thu Jul 24 18:48:02 CEST 2008


Signed-off-by: Richard Sharpe <realrichardsharpe at gmail>

---
 scripts/tgt-admin |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/tgt-admin b/scripts/tgt-admin
index e006096..76fab79 100755
--- a/scripts/tgt-admin
+++ b/scripts/tgt-admin
@@ -36,9 +36,6 @@ EOF
        exit;
 }

-# Parse the config file with Config::General
-my %conf = ParseConfig(-ConfigFile => "$configfile", -UseApacheInclude => 1, -I
ncludeGlob => 1,);
-
 my $param = $ARGV[0];

 my $execute = 0;
@@ -64,6 +61,9 @@ if (($help == 1) || ($param eq undef)) {
        &usage
 }

+# Parse the config file with Config::General
+my %conf = ParseConfig(-ConfigFile => "$configfile", -UseApacheInclude => 1, -I
ncludeGlob => 1,);
+
 # Show all the targets and exit
 if ($show == 1) {
        execute("tgtadm --lld iscsi --op show --mode target");
--
1.5.5.1



More information about the stgt mailing list