[Adduser-devel] argh
Marc Haber
mh+adduser-devel at zugschlus.de
Wed Apr 26 13:25:12 UTC 2006
On Wed, Apr 26, 2006 at 11:55:58AM +0100, Stephen Gran wrote:
> This one time, at band camp, Marc Haber said:
> > On Thu, Mar 09, 2006 at 10:32:59PM +0000, Stephen Gran wrote:
> > > # Parse options, sanity checks
> > > +exit 1 unless (
> > > GetOptions ("quiet" => sub { $verbose = 0 },
> > > "force-badname" => \$allow_badname,
> > > "help|h" => sub { &usage(); exit 0 },
> > > @@ -92,10 +93,10 @@
> > > "gid=i" => \$new_gid,
> > > "conf=s" => \$configfile,
> > > "no-create-home" => \$no_create_home,
> > > - "debug" => sub { $verbose = 2 } );
> > > + "debug" => sub { $verbose = 2 } ) );
> >
> > Doesn't this cause adduser to exit silently without error message in
> > case of a misparse?
>
> The Getopt routine should error with "unknown option: $option".
How about
"usage() unless ( GetOptions... )"?
> I will run some further tests to be sure.
Thanks.
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
More information about the Adduser-devel
mailing list