getltsconffile fails to parse BOOT_IMAGE correctly for some cases

Bug #1814006 reported by Norman Gaywood
This bug report is a duplicate of:  Bug #1594840: wrong location of lts.conf for amd64. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LTSP5
New
Undecided
Unassigned

Bug Description

/usr/share/ltsp/init-ltsp.d/05-getltsconffile parses /proc/cmdline to decide a filename and path to the lts.conf file on the tftpd server.

There are some cases where this fails, for example a pxelinux.conf/ config that looks like:

 kernel http://123.456.78.9/ltsp/amd64/vmlinuz
 append ro initrd=http://123.456.78.9/ltsp/amd64/initrd.img-generic init=/sbin/init-ltsp root=/dev/nbd0

Here is a patch to /usr/share/ltsp/init-ltsp.d/05-getltsconffile that will allow it to parse such BOOT_IMAGE strings:

# diff 05-getltsconffile /opt/ltsp-old/amd64/usr/share/ltsp/init-ltsp.d/05-getltsconffile
5,6c5
< # The path may also be part of a URL so also need to remove leading 'proto://host'
< # If there is no path, we want just "lts.conf" without inserting a slash, as some tftp
---
> # If it doesn't, we want just "lts.conf" without inserting a slash, as some tftp
11c10
< boot_image=$(cat /proc/cmdline | sed -n 's/.*BOOT_IMAGE=\([^[:space:]]*\).*/\1/p' | sed 's#^[^:]*://[^/]*##')
---
> boot_image=$(sed -n 's/.*BOOT_IMAGE=\([^[:space:]]*\).*/\1/p' /proc/cmdline)

description: updated
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Hi Norman, please test the patch attached at the last comment of https://bugs.launchpad.net/ltsp/+bug/1594840
Closing this bug as duplicate of the other one.
Thanks!

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.