Hi Michael, On 03/14/2011 06:44 PM, Michael Tautschnig wrote: > I wouldn't really feel comfortable with this happening in a softupdate because > it is rm -rf $FAI, i.e., has a variable as target. Why not just bail out with > an > error in this case? Now if you really intend to change the URL or scheme you'd > possibly be updating fai.conf manually or via a FAI-scripted operation. > Therefore you could also include the code to do this rm -rf in that round.
it's not at all obvious to me how to do this within a FAI hook/postinst without breaking the rest of the current softupdate run. How about this: if STDOUT is a terminal, prompt the user whether to rm -rf, otherwise abort with an error? Of course we should also check for the case of just an empty directory, which can be safely deleted. Regards, Michael