Re: Location of lts.conf file
Veli-Matti Lintu <veli-matti.lintu-Wdv/[email protected]> Tue, 26 Feb 2013 10:39:24 +0000 (UTC)
| Newsgroups | gmane.linux.terminal-server.devel |
|---|---|
| Message-ID | <[email protected]> |
> > BUT, what do you all think about looking for a common file as:
> > /var/lib/tftpboot/ltsp/lts.conf, without the arch ?
> Since in LTSP 6 we'll have to rewrite most of our code base,
> and all LDM_* variables won't be supported anymore due to libpam_sshauth
> / LightDM,
> so sysadmins will have to revisit their configuration anyway,
> (and it's a good chance to break backwards compatibility wrt
> configuration, removing ancient or undocumented stuff),
>
> I'm pretty much in favor of not using TFTP as the basis of our
> configuration system anymore, but instead to switch to using a (probably
> python-based) daemon that reads configuration files from the server
> /etc/ltsp/config.d/, and exports them to the clients upon request.
>
> E.g. a client could do from the initramfs:
> wget
> http://server:1234/config?phase=initramfs&arch=i386&ip=xxx&mac=xxx&hostname=xxx&...
> -O config
> . config
We wrote our own TFTP server to overcome some boottime problems in LTSP
environments. We have some thin/fat clients that need special kernels and/or
kernel parameters to work correctly. Since we have too many clients to so
that it would be practical to modify pxelinux.cfg files manually, we have
now a hook script for our TFTP server that fetches the kernel information
from LDAP when the client requests the pxelinux.cfg during boot.
This same method can be used also for generating lts.conf during boot.
puavo-tftpd server is written in ruby and it can be used in two ways:
* send output of hook scripts called when a regex matches
* static files if regexes do not match
The code is available on Github: https://github.com/opinsys/puavo-tftp
Here's an example configuration file:
/etc/puavo-tftp.yml:
-------------------------------------------------------
hooks:
- regexp: pxelinux.cfg\/01-(([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2})
command: puavo-ltspboot-config
- regexp: lts.conf$
command: puavo-lts-config
-------------------------------------------------------
This means that if regex
pxelinux.cfg\/01-(([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2})
matches, it calls the script puavo-ltspboot-config and sends the
output of the script to requesting client. Multiple regexes can call
the same script.
pxelinux.cfg script:
https://github.com/opinsys/puavo-tftp/blob/master/hooks/puavo-ltspboot-config
lts.conf script:
https://github.com/opinsys/puavo-tftp/blob/master/hooks/puavo-lts-config
One could write easily a new script that would e.g. source other files
from a directory under /etc/ltsp/config.d/ and return everything merged.
There are still some known caching issues for static files in puavo-tftpd,
but we are currently working on those.
Veli-Matti
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_____________________________________________________________________
Ltsp-developer mailing list. To un-subscribe, or change prefs, goto:
https://lists.sourceforge.net/lists/listinfo/ltsp-developer
For additional LTSP help, try #ltsp channel on irc.freenode.net