[xen-tools] Re: xen-tools final test ..

Steve Kemp steve at steve.org.uk
Tue Dec 5 15:27:06 CET 2006


On Tue, Dec 05, 2006 at 03:19:42PM +0100, Henning Sprang wrote:
> On 12/5/06, Steve Kemp <steve at steve.org.uk> wrote:
> >  How about overloading the --force flag to avoid checking for
> > the existence of the kernel/initrd image?  Would that satisfy you?
> 
> Do I get it right, you want to make force only override the missing
> kernel when no kernel is found, but not have the original function
> anymore?

  I mean:

    If --kernel is specified via the configuration file(s) / or command
    line then the file must exist unless --force is applied.

  Something like this:

     if ( $CONFIG{'kernel'} && length( $CONFIG{'kernel'} )  &&
          ( ! -e $CONFIG{'kernel'} ) )
     {
         logprint( "Kernel not found" );
         if ( $CONFIG{'force'} )
         {
            logprint( "Continuing since --force is in use\n" );
         }
         else
         {
            logprint( "Aborting\n" );
            exit;
         }
     }

> Yeah, it's redundant, and the kernel option on the command line
> actually gets ignored for all but the check then. But it works _now_
> without changing xen-tools itself :) It's just a workaround - it's an
> inevitable featire of workarounds to be a bit less eelegant :)

  Right.

> having a force-no-kernel  option would be cleaner. (and can also
> become useful for people using pygrub, when the kernel really isn't in
> the dom0 filesystem).

  I could add a "force-no-kernel" and "force-no-initrd" but the
 idea of adding more and more specific options seems a bit painful.
 Hence the suggestion to just add a new meaning to --force - if
 you have a strong preference then persuade me ;)

Steve
-- 





More information about the xen-tools-discuss mailing list