> 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
pgpnaNEN7kceY.pgp
Description: PGP signature