[Stgt-devel] [PATCH] Allow --help when there is no config file ...
Richard Sharpe
realrichardsharpe
Thu Jul 24 01:53:30 CEST 2008
Resending this as an attachment to avoid gmail trashing it ...
On Wed, Jul 23, 2008 at 2:23 PM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> Signed-off-by: Richard Sharpe (realrichardsharpe at gmail.com)
>
> From dec198acbd1e723f110c8f04316c28b953bee26e Mon Sep 17 00:00:00 2001
> From: Richard Sharpe <realrichardsharpe at gmail.com>
> Date: Wed, 23 Jul 2008 14:18:59 -0700
> Subject: [PATCH] Allow --help when there is no config file ...
>
> ---
> 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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-help-when-there-is-no-config-file.patch
Type: application/octet-stream
Size: 1028 bytes
Desc: not available
Url : https://lists.berlios.de/pipermail/stgt-devel/attachments/20080723/a6c7c87e/attachment.obj
More information about the stgt
mailing list