PHP as a FAI script

senaque at thepla.net senaque at thepla.net
Sun Feb 16 01:22:55 CET 2003


G'day folks,

I've still not heard as of yet any news regarding passwd, dpkg, debconf and 
shadow/md5 support on debian stable/woody from the word go with FAI from any 
Debian developers, etc. For the time being, if anyone is looking to do this, I suggest as 
a temporary fix to use a script similar to the one provided by Christophe Boyanique on 
the FAI list dated the 28/01/2003, and that should get it working in the meantime 
although without debconf support. I have also posted this fix to the FAI-FAQ at 
http://faifaq.andrew.net.au for easy reference.

On a different note, I am looking for information from any fai users who have 
attempted to use PHP as a fai-script. Basically, upon installation, this script 
communicates with a MySQL database running on the FAI server and, for lack of a 
better word, 'registers' the install with it. (for example network settings/hostname, what 
"class" of install it was, and in the future, possibly even the install logs). It would even 
be trivial to create a simple php interface from which to manage some FAI 
configuration data like classes, etc and for the FAI client scripts to query these. I am 
aware I could probably use PERL to do this, but as I have a working script I used 
previously that already does this, it would be a good time-saver to re-use it ;-)

Currently, the php4 script is invoked from the command-line and accepts a few 
arguments but it is easily modified to do any sort of php or mysql tasks. If I get it 
working and if anyone is interested I could post the completed scripts to fai-faq or list in 
the future. I have tried adding 'php4-mysql php4-cgi php4 mysql-client' to the 
NFSROOT_PACKAGES variable in fai.conf but an apparent bug in the postinstall 
scripts breaks it. I don't believe it to be a problem of it requiring input however, as 
installing it onto a FAI target (added to package_config) has no problems at all. This 
however would have the drawback of being forced to install php*mysql on all FAI 
targets (and then using chroot /tmp/target /usr/bin/php4 in scripts/). For the purposes 
of allowing mysql/php flexibility during installation, it only needs to be available as one 
of the valid script types on the install method/nfsroot.

Any information regarding this matter would be greatly appreciated.

Regards,

Senaque---
E-MAIL: senaque at thepla.net
IRC: #FAI @ irc.freenode.net
WWW: http://www.sf.net/users/senaque/




More information about the linux-fai mailing list