[PATCH] Let tftp use differents lts.conf files on same client

Bug #1339671 reported by Juan Antonio Martinez
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
LTSP5
Fix Released
Wishlist
Unassigned

Bug Description

Sometimes a guest machine is required to boot LTSP in several ways: thin,fat, autologin...
In this circumstance, a different per-boot configuration file lts.conf is required.
The current lts.conf provides [XX:XX (mac address)] select option, but this is not valid as we allways have the same mac

So I've added a "ltsp.ltsconf=xxx" option for kernel command line at pxegrub boot menu, that lets 05-getltsconffile script to do the work. This option is parsed in 03-kernel-cmdline script and then LTSCONF variable is exported to be used later

Here is the two-line patch:
----------------- cut here ------------
--- /opt/ltsp/i386/usr/share/ltsp/init-ltsp.d/05-getltsconffile 2014-02-27 05:22:36.000000000 +0100
+++ /opt/ltsp/i386/usr/share/ltsp/init-ltsp.d/05-getltsconffile 2014-07-09 09:55:41.724540579 +0200
@@ -9,7 +9,8 @@
     fileonly=${filename##*/}
     pathonly=${filename%$fileonly}
     lts_conf_temp=$(mktemp)
- tftp "$SERVER" -c get ${pathonly:-/ltsp/i386/}lts.conf $lts_conf_temp >/dev/null
+ lts_conf_file=${LTSCONF:-lts.conf}
+ tftp "$SERVER" -c get ${pathonly:-/ltsp/i386/}${lts_conf_file} $lts_conf_temp >/dev/null
     # only overwrite lts.conf if it has non-zero size.
     if [ -s "$lts_conf_temp" ]; then
         mv "$lts_conf_temp" /etc/lts.conf
------------------ cut here ---------------

Tested in Ubuntu 14.04 x64 server with i386 fat/thin client

Tags: lts.conf
summary: - Let tftp use differents lts.conf files on same client
+ [PATCH] Let tftp use differents lts.conf files on same client
Revision history for this message
Vagrant Cascadian (vagrantc) wrote : Re: [Bug 1339671] [NEW] Let tftp use differents lts.conf files on same client

On 2014-07-09, Juan Antonio Martinez wrote:
> So I've added a "ltsp.ltsconf=xxx" option for kernel command line at
> pxegrub boot menu, that lets 05-getltsconffile script to do the work.
> This option is parsed in 03-kernel-cmdline script and then LTSCONF
> variable is exported to be used later

Thanks for the patch!

Committed a slightly modified variation of your patch:

  https://bazaar.launchpad.net/~ltsp-upstream/ltsp/ltsp-trunk/revision/2575

Will be included in future ltsp versions.

live well,
  vagrant

Revision history for this message
Vagrant Cascadian (vagrantc) wrote :
Changed in ltsp:
importance: Undecided → Wishlist
status: New → Fix Committed
Revision history for this message
Vagrant Cascadian (vagrantc) wrote :

Released in ltsp 5.5.3.

Changed in ltsp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.