Skip to content

Commit

Permalink
cmd/incus/admin_cluster: Add libexec path for incusd
Browse files Browse the repository at this point in the history
This is where incusd is installed on Fedora Linux and derivatives,
and potentially other distributions that use /usr/libexec for non-path
executables.

Signed-off-by: Neal Gompa <neal@gompa.dev>
  • Loading branch information
Conan-Kudo committed Apr 27, 2024
1 parent 32d8488 commit af1d02c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/incus/admin_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ func (c *cmdAdminCluster) Run(cmd *cobra.Command, args []string) {
env := getEnviron()
path, _ := exec.LookPath("incusd")
if path == "" {
if util.PathExists("/usr/lib/incus/incusd") {
if util.PathExists("/usr/libexec/incus/incusd") {
path = "/usr/libexec/incus/incusd"
else if util.PathExists("/usr/lib/incus/incusd") {
path = "/usr/lib/incus/incusd"
} else if util.PathExists("/opt/incus/bin/incusd") {
path = "/opt/incus/bin/incusd"
Expand Down

0 comments on commit af1d02c

Please sign in to comment.