[Xorp-hackers] Minor xorpsh bugs
Pavlin Radoslavov
pavlin at ICSI.Berkeley.EDU
Thu Jul 24 00:01:34 PDT 2008
Ben,
Thank you for the patch. I just committed it to CVS.
Regarding "xorpsh -e" it appears a bug, hence please submit a
Bugzilla entry.
Pavlin
Ben Greear <greearb at candelatech.com> wrote:
> Ben Greear wrote:
> > I believe xorpsh -e does not work:
> >
> > [root at lanforge-D0-20 bin]# ./xorpsh -e
> > created new heap in find_heap, ptr: 0x8254210
> > [ 2008/07/23 13:11:24 WARNING xorpsh LIBXORP ] read error: _fd: 22 offset: 0 total-len: 4 error: Connection refused
> > [ 2008/07/23 13:11:24 WARNING xorpsh LIBXORP ] read error: _fd: 22 offset: 0 total-len: 4 error: Connection refused
> > ....
> >
> > I would expect it to abort immediately.
> >
> > Also, xorpsh -h exits with error code 1 instead of zero.
> >
> > This matters because I'm trying to run an automated test to
> > see if xorp can start (ie, libraries are all configured right, etc).
> >
> > [root at lanforge-D0-20 bin]# ./xorpsh -h
> > Usage: xorpsh [options]
> > Options:
> > -c Specify command(s) to execute
> > -e Exit immediately if cannot connect to the rtrmgr
> > -h Display this information
> > -v Print verbose information
> > -t <dir> Specify templates directory
> > -x <dir> Specify Xrl targets directory
> > Defaults:
> > Templates directory := /usr/local/xorp/etc/templates
> > Xrl targets directory := /usr/local/xorp/xrl/targets
> > Print verbose information := false
> > [root at lanforge-D0-20 bin]# echo $?
> > 1
>
> Here's the trivial patch for this one:
>
> diff --git a/rtrmgr/xorpsh_main.cc b/rtrmgr/xorpsh_main.cc
> index ce9407c..582e5cf 100644
> --- a/rtrmgr/xorpsh_main.cc
> +++ b/rtrmgr/xorpsh_main.cc
> @@ -877,7 +877,7 @@ main(int argc, char *argv[])
> case 'h':
> usage(argv[0]);
> display_defaults();
> - errcode = 1;
> + errcode = 0;
> goto cleanup;
> }
> }
>
>
> >
> >
> > Thanks,
> > Ben
> >
>
>
> --
> Ben Greear <greearb at candelatech.com>
> Candela Technologies Inc http://www.candelatech.com
>
> _______________________________________________
> Xorp-hackers mailing list
> Xorp-hackers at icir.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
More information about the Xorp-hackers
mailing list