Skip to content

Commit 777ae25

Browse files
committed
append only valid key=value lines for agama.conf
inst.info=URL allows to retrieve agama settings from a remote location. Usually the expected settings are in key=value format. This change allows to reuse the inst.info=URL feature for the cobbler "nopxe" API, just like it is done in linuxrc. The system needs to notify cobbler that it booted "far enough", so that cobbler can change the boot loader default from "boot from network" to "boot from local disk". The client has to send a HTTP GET request to the specified URL. cobbler sends the four bytes 'True' in return, which can system has to ignore. Since the content is not and can not be a valid Agama key=value pair, consider only lines that contain '=' in the input file. Fixes #2185 Signed-off-by: Olaf Hering <olaf@aepfle.de>
1 parent 5fadd0f commit 777ae25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

live/root/usr/bin/info-cmdline-conf.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ expand_info_arg() {
2020
# remove info param
2121
sed -in 's/\([[:space:]]\|^\)\(inst\|agama\)\.info=[^[:space:]]\+//' "${TARGET}"
2222
# and add content of info file
23-
cat "${INFO_CONTENT}" >> "${TARGET}"
23+
grep -- '=' "${INFO_CONTENT}" >> "${TARGET}"
2424

2525
return 0
2626
}

0 commit comments

Comments
 (0)