fcopy resolv.conf in task_repository

Thomas Lange lange at informatik.uni-koeln.de
Thu Feb 1 13:00:18 CET 2018


>>>>> On Wed, 24 Jan 2018 09:43:44 +0000, "Schulz, Reiner" <R.Schulz at dvz-mv.de> said:

    > In subroutines/task_repository you fcopy /etc/resolv.conf. 
    > It is possible to omit this?
This can only be omited by rewriting task_repository or using a hook
as you already did.

    > In task_confdir the resolv.conf of the FAI Server is copied to the installing client, that fine for us.
    > We fcopy the production resolv.conf with the LAST class.
When using fcopy for two different environments fcopy cannot handle
this because the list of classes is fixed. In task_repository the code
defines that when using fcopy /etc/resolv.conf successfully copies a
file, we do not use the resolv.conf from the server. We could change
this ordering in task_repository. But I suggest this solution.

Remove your repository.DEBIAN_9 hook and write a hook
updatebase.DEBIAN_9. In this hook you use:

[ -f /etc/resolv.conf ] && cp $v /etc/resolv.conf $FAI_ROOT/etc

This will overwrite the fcopy version of resolv.conf in /target (done
by task_repository) by the resolv.conf from inside the nfsroot, which
is what you want to have.

-- 
regards Thomas


More information about the linux-fai mailing list