From 352df4e62fb5f69a133254bb8b914e9463b0b08e Mon Sep 17 00:00:00 2001 From: Krzysztof Nazarewski <3494992+nazarewk@users.noreply.github.com> Date: Fri, 1 Apr 2022 16:23:33 +0200 Subject: [PATCH] osd: add NixOS specific PATHs This commits makes Rook usable on NixOS. NixOS system holds "installed" binaries in `/run/current-system/sw/{bin,sbin}`. The only binaries residing outside those paths are `/usr/bin/env` and `/bin/sh`. I got a suggestion on Slack to simply add those NixOS specific paths Signed-off-by: Krzysztof Nazarewski <3494992+nazarewk@users.noreply.github.com> --- pkg/daemon/ceph/osd/nsenter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/daemon/ceph/osd/nsenter.go b/pkg/daemon/ceph/osd/nsenter.go index e44eb867f..5388e5f10 100644 --- a/pkg/daemon/ceph/osd/nsenter.go +++ b/pkg/daemon/ceph/osd/nsenter.go @@ -34,7 +34,7 @@ const ( ) var ( - binPathsToCheck = []string{"/usr/sbin", "/sbin/"} + binPathsToCheck = []string{"/usr/sbin", "/sbin/", "/run/current-system/sw/bin", "/run/current-system/sw/sbin"} ) // NSEnter is an nsenter object