diff --git a/pkgs/os-specific/bsd/openbsd/pkgs/fsck/fsck-path.patch b/pkgs/os-specific/bsd/openbsd/pkgs/fsck/fsck-path.patch new file mode 100644 index 000000000000..a49ac7ceb04c --- /dev/null +++ b/pkgs/os-specific/bsd/openbsd/pkgs/fsck/fsck-path.patch @@ -0,0 +1,25 @@ +diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c +index 19e730a484f..176d614d986 100644 +--- a/sbin/fsck/fsck.c ++++ b/sbin/fsck/fsck.c +@@ -308,18 +308,8 @@ checkfs(const char *vfstype, const char *spec, const char *mntpt, void *auxarg, + _exit(0); + + /* Go find an executable. */ +- edir = edirs; +- do { +- (void)snprintf(execname, +- sizeof(execname), "%s/fsck_%s", *edir, vfstype); +- execv(execname, (char * const *)argv); +- if (errno != ENOENT) { +- if (spec) +- warn("exec %s for %s", execname, spec); +- else +- warn("exec %s", execname); +- } +- } while (*++edir != NULL); ++ (void)snprintf(execname, sizeof(execname), "fsck_%s", vfstype); ++ execvp(execname, (char * const *)argv); + + if (errno == ENOENT) { + if (spec) diff --git a/pkgs/os-specific/bsd/openbsd/pkgs/fsck.nix b/pkgs/os-specific/bsd/openbsd/pkgs/fsck/package.nix similarity index 61% rename from pkgs/os-specific/bsd/openbsd/pkgs/fsck.nix rename to pkgs/os-specific/bsd/openbsd/pkgs/fsck/package.nix index c1afc90746ae..c7a9e307f932 100644 --- a/pkgs/os-specific/bsd/openbsd/pkgs/fsck.nix +++ b/pkgs/os-specific/bsd/openbsd/pkgs/fsck/package.nix @@ -1,4 +1,6 @@ { mkDerivation }: mkDerivation { path = "sbin/fsck"; + + patches = [ ./fsck-path.patch ]; }