Skip to content

Commit 91ed118

Browse files
committed
fix(sandbox): use /bin/sh instead of /bin/bash for reclaim compatibility
Changes /bin/bash to /bin/sh in StartEnvdBash to support minimal guest images that only include sh. The reclaim commands (sync, drop_caches, compact_memory, fstrim) are already shell-compatible and the script uses 'sh -c' internally, so this change ensures reclaim works on all guest images. Fixes bug 146da99c-5417-4779-ac7c-c26ef1542a93
1 parent ec3db39 commit 91ed118

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/orchestrator/pkg/sandbox/envd_process.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
)
1717

1818
// StartEnvdBash opens a streaming Process.Start call against this
19-
// sandbox's envd, running `/bin/bash` with the given args as `user`.
19+
// sandbox's envd, running `/bin/sh` with the given args as `user`.
2020
// Caller chooses login-shell vs. plain (e.g. []{"-l","-c",cmd} vs.
2121
// []{"-c",script}). When timeout > 0 it sets `Connect-Timeout-Ms` so
2222
// envd kills the process at the deadline. Auth/user headers are wired
@@ -31,7 +31,7 @@ func (s *Sandbox) StartEnvdBash(
3131
pc := processconnect.NewProcessClient(&http.Client{Transport: sandboxHttpClient.Transport}, addr)
3232

3333
req := connect.NewRequest(&process.StartRequest{
34-
Process: &process.ProcessConfig{Cmd: "/bin/bash", Args: bashArgs},
34+
Process: &process.ProcessConfig{Cmd: "/bin/sh", Args: bashArgs},
3535
})
3636
if timeout > 0 {
3737
req.Header().Set("Connect-Timeout-Ms", strconv.FormatInt(timeout.Milliseconds(), 10))

0 commit comments

Comments
 (0)