Skip to content

Commit 22d8d2c

Browse files
committed
Use ttyS1 as default
1 parent 4f97277 commit 22d8d2c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pixiecore/http.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ func ipxeScript(mach Machine, spec *Spec, serverHost string) ([]byte, error) {
196196
urlTemplate := fmt.Sprintf("http://%s/_/file?name=%%s&type=%%s&mac=%%s", serverHost)
197197
var b bytes.Buffer
198198
b.WriteString("#!ipxe\n")
199-
b.WriteString("set console ttyS0\n")
200-
b.WriteString("iseq ${manufacturer} Supermicro && set console ttyS1 ||\n")
199+
b.WriteString("set console ttyS1\n")
200+
b.WriteString("iseq ${manufacturer} :Dell\\ Inc. && set console ttyS0 ||\n")
201201
u := fmt.Sprintf(urlTemplate, url.QueryEscape(string(spec.Kernel)), "kernel", url.QueryEscape(mach.MAC.String()))
202202
fmt.Fprintf(&b, "kernel --name kernel %s\n", u)
203203
for i, initrd := range spec.Initrd {

pixiecore/http_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ func TestIpxe(t *testing.T) {
6666
}
6767

6868
expected := `#!ipxe
69-
set console ttyS0
70-
iseq ${manufacturer} Supermicro && set console ttyS1 ||
69+
set console ttyS1
70+
iseq ${manufacturer} :Dell\ Inc. && set console ttyS0 ||
7171
kernel --name kernel http://localhost:1234/_/file?name=k-01%3A02%3A03%3A04%3A05%3A06-0&type=kernel&mac=01%3A02%3A03%3A04%3A05%3A06
7272
initrd --name initrd0 http://localhost:1234/_/file?name=i1-01%3A02%3A03%3A04%3A05%3A06-0&type=initrd&mac=01%3A02%3A03%3A04%3A05%3A06
7373
initrd --name initrd1 http://localhost:1234/_/file?name=i2-01%3A02%3A03%3A04%3A05%3A06-0&type=initrd&mac=01%3A02%3A03%3A04%3A05%3A06
@@ -93,8 +93,8 @@ boot kernel initrd=initrd0 initrd=initrd1 console=${console},115200n8 thing=http
9393
}
9494

9595
expected = `#!ipxe
96-
set console ttyS0
97-
iseq ${manufacturer} Supermicro && set console ttyS1 ||
96+
set console ttyS1
97+
iseq ${manufacturer} :Dell\ Inc. && set console ttyS0 ||
9898
kernel --name kernel http://localhost:1234/_/file?name=k-fe%3Afe%3Afe%3Afe%3Afe%3Afe-1&type=kernel&mac=fe%3Afe%3Afe%3Afe%3Afe%3Afe
9999
initrd --name initrd0 http://localhost:1234/_/file?name=i1-fe%3Afe%3Afe%3Afe%3Afe%3Afe-1&type=initrd&mac=fe%3Afe%3Afe%3Afe%3Afe%3Afe
100100
initrd --name initrd1 http://localhost:1234/_/file?name=i2-fe%3Afe%3Afe%3Afe%3Afe%3Afe-1&type=initrd&mac=fe%3Afe%3Afe%3Afe%3Afe%3Afe

0 commit comments

Comments
 (0)