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

Richard Sharpe realrichardsharpe
Wed Jul 23 23:18:59 CEST 2008


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

diff --git a/scripts/tgt-admin b/scripts/tgt-admin
index 05ed2d8..1ec67bb 100755
--- a/scripts/tgt-admin
+++ b/scripts/tgt-admin
@@ -17,9 +17,6 @@ use Getopt::Long;
 # Our config file
 my $configfile = "/etc/tgt/targets.conf";

-# Parse the config file with Config::General
-my %conf = ParseConfig(-ConfigFile => "$configfile", -UseApacheInclude => 1, -I
ncludeGlob => 1,);
-
 sub usage {
        print <<EOF;
 Usage:
@@ -56,6 +53,8 @@ if (($help == 1) || ($param eq undef)) {
        &usage
 }

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

 # Some variables/arrays/hashes we will use globally
 my %tgtadm_output;
--
1.5.5.1



More information about the stgt mailing list