Hi Erik:

Thanks for the patch.

However, the build_oscar_image_cli script isn't supposed to be called
directly, that's why there is no interface check.

Perhaps you can call main_cli by skipping all the previous steps?  See
./main_cli --help for more info.

BTW, if you have other suggestions to make the CLI better, please let us know!

Cheers,

Bernard

On 3/14/07, Erik Jacobson <[EMAIL PROTECTED]> wrote:
> Hello.  We're using oscar 5.0.
>
> For some operations, we wish to use a command line tool for creating the
> image.  So we used build_oscar_image_cli.
>
> It requires an interface name to work properly, but doesn't enforce this
> as an argument.  Therefore, it's easy to forget the interface name and
> then the script spews out an error near the end (from the post_rpm__install
> script).  I put a patch at the very end of this email.  Here is the error
> we hit if we don't specify the interface and try to build an image:
>
> ...
> --> Running: /opt/oscar/scripts/post_rpm_install eriktest
> Only one argument passed - please pass <image name> and <headnode interface 
> name> at /opt/oscar/scripts/post_rpm_install line 43
> Bad file descriptor at ./build_oscar_image_cli line 351
>         main::postimagebuild() called at ./build_oscar_image_cli line 295
>         main::add_image_build('postinstall', 'CODE(0x11fa6f0)', 'ipmeth', 
> 'static', 'pkgfile', '/opt/oscar/oscarsamples/sles-10-x86_64.rpmlist', 
> 'distro', 'sles-10-x86_64', 'arch', ...) called at ./build_oscar_image_cli 
> line 204
>
> (snip)
>
>
> This is just a simple patch, perhaps someone else wants to solve this
> more neatly :)
>
>
> --- oscar-5.0.sgi/src/cli/build_oscar_image_cli.orig    2007-03-13 
> 09:27:21.000000000 -0500
> +++ oscar-5.0.sgi/src/cli/build_oscar_image_cli 2007-03-13 09:49:36.000000000 
> -0500
> @@ -31,6 +31,12 @@
>
>  GetOptions('help' => \$help, 'filename=s' => \$file, 'f=s' => \$file);
>
> +# ARGV[0] is required and passwd to post_rpm_install below - so require it.
> +if ( (! $help) && ( $ARGV[0] eq "" ) ) {
> +       print "\nThe adapter to use on the head node is missing.\n\n";
> +       $help=1;
> +}
> +
>  if ($help)
>  {
>         print "Usage: build_oscar_image_cli [FLAGS] adapter
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Oscar-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oscar-devel
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Oscar-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to