Small improvement for make-fai-nfsroot
Michael Tautschnig
mt at debian.org
Fri Jan 8 09:17:03 CET 2010
> Hi FAIarians,
>
> I had small problems with make-fai-nfsroot and hooks: the script tried
> to run backup files (*~) as well as subdirectories beneath my
> $NFSROOT_HOOKS and failed on the first error because of running with
> "set -e". This is not the behavior I intended.
>
> My quick hack solution is to delegate running hook scripts to run-parts
> (from the debianutils package). So only executable files matching a
> given pattern will be executed. The only drawback (?) is that scripts
> run in a separate process, so environment variables they use must be
> exported (in my case that's only $NFSROOT and $NFSROOT_HOOKS).
>
[...]
I'd vote for some consistent function within all of FAI that is similar in
spirit to run-parts:
- Execute all files matching a pattern in some well-defined order (usable for
hooks in make-fai-nfsroot, hooks in fai, scripts in class/, scripts in
scripts/)
- BUT: also honor a .source extension and correspondingly source the file
instead of executing it in place.
I haven't checked the code, but Thomas probably knows right away: Are there even
more places where something like this would be handy?
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/attachments/20100108/7e3cd331/attachment.bin
More information about the linux-fai
mailing list