Skip to content

Commit

Permalink
Merge pull request containers#1496 from dfr/freebsd-init
Browse files Browse the repository at this point in the history
override DefaultInitPath for FreeBSD
  • Loading branch information
openshift-merge-robot authored Jun 12, 2023
2 parents 2bc6436 + d6abc58 commit 3d71cc7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package config

import (
"bytes"
"fmt"
"io"
"os"
"runtime"
"sort"
"strings"

Expand Down Expand Up @@ -509,6 +511,9 @@ image_copy_tmp_dir="storage"`

It("Test Capabilities call", func() {
// Given
if runtime.GOOS != "linux" {
Skip(fmt.Sprintf("capabilities not supported on %s", runtime.GOOS))
}
// When
config, err := NewConfig("")
// Then
Expand Down
2 changes: 0 additions & 2 deletions pkg/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ const (
)

var (
// DefaultInitPath is the default path to the container-init binary.
DefaultInitPath = "/usr/libexec/podman/catatonit"
// DefaultInfraImage is the default image to run as infrastructure containers in pods.
DefaultInfraImage = ""
// DefaultRootlessSHMLockPath is the default path for rootless SHM locks.
Expand Down
7 changes: 7 additions & 0 deletions pkg/config/default_common.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//go:build !freebsd
// +build !freebsd

package config

// DefaultInitPath is the default path to the container-init binary.
var DefaultInitPath = "/usr/libexec/podman/catatonit"
3 changes: 3 additions & 0 deletions pkg/config/default_freebsd.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package config

// DefaultInitPath is the default path to the container-init binary.
var DefaultInitPath = "/usr/local/libexec/podman/catatonit"

func getDefaultCgroupsMode() string {
return "enabled"
}
Expand Down

0 comments on commit 3d71cc7

Please sign in to comment.