[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 07/12 v4] tools/pygrub: store kernels in /var/run/xen/pygrub



On Fri, 2014-05-02 at 13:02 +0200, Olaf Hering wrote:
> On Fri, May 02, Ian Campbell wrote:
> 
> > On Thu, 2014-04-24 at 14:12 +0200, Olaf Hering wrote:
> > > Move location of temporary bootfiles from /var/run/xend/boot to
> > > /var/run/xen/pygrub. Create the subdirectory if does not exist, unless
> > > --output-directory=<dir> was specified.
> > 
> > I'm not at all opposed to this change but why this last condition? Any
> > reason not to always create the directory if it doesn't exist?
> > 
> > Or should there be an existence check when you specify
> > --output-directory?
> 
> Without --output-directory the default should be created internally.
> With --output-directory the specified dir should exist already.
> Perhaps new code can be added to check if the given path is a directory.

Probably. That would also lead to a potentially simplicifaction and
keeping the default up at the top:

        initially:
        output_directory = "/var/path/todefault"

        then when handling --output:
                fi not os.path.isdir(argument):
                        ARGH!
                output_directory = argument

        eventually:
        
        if not os.path.isdir(argument): # will never hit if --output-directory 
was given
                os.path.mkdir
                
What do you think?



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.