File tree 3 files changed +11
-1
lines changed
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 {
28
28
29
29
func daemonAction (cmd * cobra.Command , _ []string ) error {
30
30
socket := "/run/lima-guestagent.sock"
31
+ { // runtime.GOOS == "freebsd"
32
+ socket = "/var" + socket
33
+ }
31
34
tick , err := cmd .Flags ().GetDuration ("tick" )
32
35
if err != nil {
33
36
return err
Original file line number Diff line number Diff line change @@ -539,6 +539,9 @@ func (a *HostAgent) watchGuestAgentEvents(ctx context.Context) {
539
539
540
540
localUnix := filepath .Join (a .instDir , filenames .GuestAgentSock )
541
541
remoteUnix := "/run/lima-guestagent.sock"
542
+ if * a .y .OS == limayaml .FREEBSD {
543
+ remoteUnix = "/var" + remoteUnix
544
+ }
542
545
543
546
a .onClose = append (a .onClose , func () error {
544
547
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.
134
134
` ,
135
135
})
136
136
} else {
137
+ run := "/run"
138
+ if * a .y .OS == limayaml .FREEBSD {
139
+ run = "/var" + run
140
+ }
137
141
req = append (req , requirement {
138
142
description : "the guest agent to be running" ,
139
143
script : `#!/bin/bash
140
144
set -eux -o pipefail
141
- sock="/ run/lima-guestagent.sock"
145
+ sock="` + run + ` /lima-guestagent.sock"
142
146
if ! timeout 30s bash -c "until [ -S \"${sock}\" ]; do sleep 3; done"; then
143
147
echo >&2 "lima-guestagent is not installed yet"
144
148
exit 1
You can’t perform that action at this time.
0 commit comments