I'm attaching a untested patch which modifies ltsp-update-image and
update-kernels so that they (hopefully) work correctly when nbd port !=
2000.

I didn't test it because I would prefer a more drastic solution. Here's the 
current situation:
 * update-kernels creates a pxelinux.cfg/default on the chroot, taking into 
account the settings from $chroot/etc/ltsp/update-kernels.conf.
 * ltsp-update-kernels blindly copies that to the tftp dir, even if the target 
already exists.
 * ltsp-update-image tries to fix the tftp file with `sed` if another port is 
required, and tries to update $chroot/etc/ltsp/update-kernels.conf.
   Of course the next time ltsp-update-kernels is ran, all the `sed`ding is 
lost, as the tftp file is blindly overwritten.

Here's what I propose instead:
 * update-kernels doesn't have enough info to properly create a 
pxelinux.cfg/default, so it shouldn't bother at all. E.g. it doesn't know if a 
different nbd port is required (while ltsp-update-image knows that).
 * ltsp-update-kernels shouldn't blindly copy the chroot file to the tftp dir. 
It should either create the tftp file from scratch using the correct settings 
found in /etc/ltsp/ltsp-update-kernels, and overriden by per-chroot-settings on 
$chroot/etc/ltsp/update-kernels.conf, or it should sed the file.
 * Any script interested in modifying the kernel settings (like 
ltsp-update-image) should modify $chroot/etc/ltsp/update-kernels.conf instead, 
and if it wants an instant update of the tftp file, it should call 
ltsp-update-kernels.

Thoughts?

** Attachment added: "patch"
   http://launchpadlibrarian.net/37642647/patch

-- 
pxelinux.cfg/default isn't generated correctly for ports<>2000
https://bugs.launchpad.net/bugs/504733
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to