Source dir for fcopy

Holger Parplies wfai at parplies.de
Thu Jan 22 11:03:18 CET 2015


Hi,

Norberto Meijome wrote on 2015-01-22 12:08:56 +1100 [Source dir for fcopy]:
> I want to use fcopy to push a set of initial ssh pub keys to the root user
> in the host being built, i.e., /root/.ssh/authorized_keys
> [...]
> 1. I understand FAI/files is the default source dir for fcopy... alas, I
> have FAI=*/data/f*ai/config in /etc/fai/fai.conf
> 
> variables.log in a newly built host shows
> FAI=*/var/lib/fai/*config <<<< why not the value in /etc/fai/fai.conf?

because it's mounted to /var/lib/fai on the client to be installed.

> 2. *where* do I need to put the files to be copied by fcopy?

In $FAI/files, just as you were expecting.

> in the script of my class, I have
> fcopy -i -v -s /data/fai/config/files/ /root/.ssh/authorized_keys
> 
> ( to avoid the confusion from #1 above)...

Actually, you are creating the confusion you want to avoid :-). It seems to
be quite common in the IT world that things that "just work" stop just working
when people start "fixing things" in anticipation of a problem :-). As Dirk
suggested, leave out the -s option, and you should be fine.

In case it's not obvious, if the *script* containing the fcopy command (under
$FAI/scripts) is found, it is more than likely that the referenced files (under
$FAI/files) will be found, too.

> [...]
> But I do have the file :)
> (on my fai-server...) find /data/fai/config/files/root/
   ^^^^^^^^^^^^^^^^
Yes, but the script is not run on the FAI server. On the *client*,
fai-server:/data/fai/config is mounted to /var/lib/fai/config, so that's
where you'll find the files.

Hope that helps.

Regards,
Holger


More information about the linux-fai mailing list