Skip to content

Commit bda0bf0

Browse files
authored
Merge pull request #103 from fujiwara/tncl-0.0.6
update to tncl v0.0.6
2 parents 98bcd97 + b6ab68b commit bda0bf0

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.PHONY: test install clean
22

3-
TNCL_VERSION=v0.0.5
3+
TNCL_VERSION=v0.0.6
44

55
test:
66
TZ=Asia/Tokyo go test ./...

assets/tncl-aarch64-linux-musl

100644100755
9.24 KB
Binary file not shown.

assets/tncl-x86_64-linux-musl

100644100755
9.29 KB
Binary file not shown.

cp.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,14 @@ var bootAgentTmpl = template.Must(template.New("").Parse(
6060
EOF_OF_AGENT_COMMAND
6161
6262
chmod +x {{.Cmd}}
63-
{{.Cmd}} {{.Port}} {{if .Upload}}>{{else}}<{{end}} "{{.Filename}}"
63+
{{.Cmd}} {{.Host}}:{{.Port}} {{if .Upload}}>{{else}}<{{end}} "{{.Filename}}"
6464
'
6565
`))
6666

6767
type bootAgentTmplData struct {
6868
Base64Binary string
6969
Cmd string
70+
Host string
7071
Port int
7172
Upload bool
7273
Filename string
@@ -99,6 +100,7 @@ func (cp *cpTask) bootAgent() string {
99100
bootAgentTmpl.Execute(buf, &bootAgentTmplData{
100101
Base64Binary: b64,
101102
Cmd: "/tmp/tncl",
103+
Host: "127.0.0.1",
102104
Port: cp.port,
103105
Upload: cp.upload,
104106
Filename: cp.remoteFile,
@@ -209,8 +211,8 @@ func (app *Ecsta) RunCp(ctx context.Context, opt *CpOption) error {
209211
for scanner.Scan() {
210212
line := scanner.Text()
211213
slog.Debug(line)
212-
// tncl says "listening on port ..." when ready for connection
213-
if !closed && strings.Contains(line, "listening on port") {
214+
// tncl says "listening on ..." when ready for connection
215+
if !closed && strings.Contains(line, "listening on") {
214216
close(ready)
215217
closed = true
216218
}

0 commit comments

Comments
 (0)