Switching $FAI_CONFIG_SRC
Michael Tautschnig
mt at debian.org
Tue Mar 15 00:48:52 CET 2011
Hi again,
> 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.
>
I didn't claim it was trivial :-) - likely it would work best by temporarily
installing a cron job that deletes itself afterwards. Doing it manually might be
simpler, though.
> 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.
>
I'd mainly opt for sanity checks on the value and contents of $FAI before
calling rm -rf $FAI (e.g., either $FAI is an empty directory or $FAI/class and
$FAI/scripts exist).
Of course, you may also claim that running a softupdate puts your system at risk
of breaking lots of things anyway, but then at least FAI core components should
have some safety net built in.
Best,
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.uni-koeln.de/pipermail/linux-fai-devel/attachments/20110314/318f1e81/attachment.bin>
More information about the linux-fai-devel
mailing list