Skip to content

Commit 265734a

Browse files
committed
Copy launcher binary when using netlaunch
1 parent 750cdcc commit 265734a

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

crates/trident/src/subsystems/management.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ impl Subsystem for ManagementSubsystem {
6464
path::join_relative(mount_path, TRIDENT_BINARY_PATH),
6565
)
6666
.structured(ServicingError::CopyTridentBinary)?;
67+
68+
fs::copy(
69+
"/usr/bin/launcher",
70+
path::join_relative(mount_path, "/usr/bin/launcher"),
71+
)
72+
.structured(ServicingError::CopyTridentBinary)?;
6773
}
6874

6975
Ok(())

tools/pkg/netlaunch/netlaunch.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,12 @@ func injectRcpAgentConfig(
415415
rcpAgentConfBuilder.registerRcpFile(newRcpAgentFileDownload("osmodifier", "/usr/bin/osmodifier", 0755, data))
416416
}
417417

418+
data, err := os.ReadFile("bin/launcher")
419+
if err != nil {
420+
return fmt.Errorf("failed to read local launcher binary from 'bin/launcher': %w", err)
421+
}
422+
rcpAgentConfBuilder.registerRcpFile(newRcpAgentFileDownload("launcher", "/usr/bin/launcher", 0755, data))
423+
418424
for _, extraFile := range extraFiles {
419425
rcpAgentConfBuilder.registerRcpFile(extraFile)
420426
}

0 commit comments

Comments
 (0)