openbsd.fsck: Override paths
This commit is contained in:
committed by
Audrey Dutcher
parent
fb6a7bfe74
commit
55d65381bb
@@ -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)
|
||||
+2
@@ -1,4 +1,6 @@
|
||||
{ mkDerivation }:
|
||||
mkDerivation {
|
||||
path = "sbin/fsck";
|
||||
|
||||
patches = [ ./fsck-path.patch ];
|
||||
}
|
||||
Reference in New Issue
Block a user