Compiling source code on FAI client

Michael Tautschnig tautschn at model.in.tum.de
Tue Feb 12 08:57:31 CET 2008


> Thanks for your tip, but I still have some difficulties. When I proceed as 
> you described, the code will be compiled, but the output file will be 
> written to root directory. So, I have to change the directory for 
> compilation.  I thought that something like
>
> $ROOTCMD cd /home/cluster/clustersoft
> $ROOTCMD gcc /home/cluster/clustersoft/test.c
>
> resp.
>
> $ROOTCMD cd /home/cluster/clustersoft
> $ROOTCMD gcc test.c
>

Ähm - no. chroot <commands> will perform the command in a new shell, thus any cd
command is not visible in later chroot calls. What should work instead is the
following

$ROOTCMD { cd /home/cluster/clustersoft ; gcc test.c }

HTH,
Michael

-------------- nächster Teil --------------
Ein Dateianhang mit Bin?rdaten wurde abgetrennt...
Dateiname   : nicht verf?gbar
Dateityp    : application/pgp-signature
Dateigr??e  : 194 bytes
Beschreibung: nicht verf?gbar
URL         : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20080212/72d2ee50/attachment.bin 


More information about the linux-fai mailing list