[Libguestfs] [PATCH 03/11] customize: fix windows firstboot script

Roman Kagan rkagan at virtuozzo.com
Fri May 13 09:41:59 UTC 2016


On Fri, May 13, 2016 at 10:45:33AM +0200, Cedric Bosdonnat wrote:
> On Fri, 2016-05-13 at 10:36 +0300, Roman Kagan wrote:
> > IMO deleting anything is a bad idea, in particular, because a
> > succefully
> > completed script may cause the following ones to fail.
> 
> Well, I guess most of the users won't be aware of it and scripts will
> probably stay there for ever.

I don't think it's a problem.  We leave logs behind; the scripts are no
worse.

> > The whole point of scripts_done is to preserve all the steps but move
> > them out of the way.
> > 
> > I think the only controversial item is whether to move them to
> > scripts_done on success only or regardless of the status: there are
> > pros
> > and cons either way.
> 
> The goal of moving the script to scripts_done BEFORE running was to
> avoid running them twice if the system reboots in the middle of the
> firstboot script.

Running them twice would be *desirable*.  The problem would be if a
script is broken and *causes* the reboot: then it'd never quit the loop.

And I agree it outweighs all the rest so this part of your patch looks
good.

Roman.




More information about the Libguestfs mailing list