Skip to content

Commit 1ab4a76

Browse files
authored
Handle kernel parameters with = in their value: (#207)
## Description Handle kernel parameters with `=` in their value. This enables kernel parameters to be correctly parsed. ## Why is this needed Fixes: # ## How Has This Been Tested? ## How are existing users impacted? What migration steps/scripts do we need? ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
2 parents 1c70f2a + 7736b97 commit 1ab4a76

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hook-bootkit/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ func removeTinkWorkerContainer(ctx context.Context, cli *client.Client) error {
247247
// https://github.com/tinkerbell/boots/blob/main/ipxe/hook.go
248248
func parseCmdLine(cmdLines []string) (cfg tinkWorkerConfig) {
249249
for i := range cmdLines {
250-
cmdLine := strings.Split(cmdLines[i], "=")
250+
cmdLine := strings.SplitN(cmdLines[i], "=", 2)
251251
if len(cmdLine) == 0 {
252252
continue
253253
}

hook-docker/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func (d dockerConfig) writeToDisk(loc string) error {
100100
// parseCmdLine will parse the command line.
101101
func parseCmdLine(cmdLines []string) (cfg tinkConfig) {
102102
for i := range cmdLines {
103-
cmdLine := strings.Split(cmdLines[i], "=")
103+
cmdLine := strings.SplitN(cmdLines[i], "=", 2)
104104
if len(cmdLine) == 0 {
105105
continue
106106
}

0 commit comments

Comments
 (0)