File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ func newDaemonCommand() *cobra.Command {
2828
2929func daemonAction (cmd * cobra.Command , _ []string ) error {
3030 socket := "/run/lima-guestagent.sock"
31+ { // runtime.GOOS == "freebsd"
32+ socket = "/var" + socket
33+ }
3134 tick , err := cmd .Flags ().GetDuration ("tick" )
3235 if err != nil {
3336 return err
Original file line number Diff line number Diff line change @@ -539,6 +539,9 @@ func (a *HostAgent) watchGuestAgentEvents(ctx context.Context) {
539539
540540 localUnix := filepath .Join (a .instDir , filenames .GuestAgentSock )
541541 remoteUnix := "/run/lima-guestagent.sock"
542+ if * a .y .OS == limayaml .FREEBSD {
543+ remoteUnix = "/var" + remoteUnix
544+ }
542545
543546 a .onClose = append (a .onClose , func () error {
544547 logrus .Debugf ("Stop forwarding unix sockets" )
Original file line number Diff line number Diff line change @@ -134,11 +134,15 @@ A possible workaround is to run "lima-guestagent install-systemd" in the guest.
134134` ,
135135 })
136136 } else {
137+ run := "/run"
138+ if * a .y .OS == limayaml .FREEBSD {
139+ run = "/var" + run
140+ }
137141 req = append (req , requirement {
138142 description : "the guest agent to be running" ,
139143 script : `#!/bin/bash
140144set -eux -o pipefail
141- sock="/ run/lima-guestagent.sock"
145+ sock="` + run + ` /lima-guestagent.sock"
142146if ! timeout 30s bash -c "until [ -S \"${sock}\" ]; do sleep 3; done"; then
143147 echo >&2 "lima-guestagent is not installed yet"
144148 exit 1
You can’t perform that action at this time.
0 commit comments