From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 1 May 2014 14:10:10 +0200 Subject: [PATCH] Look for fsck in the right place --- src/fsck/fsck.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c index 73c76fceea..d00cea7158 100644 --- a/src/fsck/fsck.c +++ b/src/fsck/fsck.c @@ -352,6 +352,7 @@ static int run(int argc, char *argv[]) { if (r == 0) { char dash_c[STRLEN("-C") + DECIMAL_STR_MAX(int) + 1]; int progress_socket = -1; + _cleanup_free_ char *fsck_name = NULL; const char *cmdline[9]; int i = 0; @@ -372,7 +373,10 @@ static int run(int argc, char *argv[]) { } else dash_c[0] = 0; - cmdline[i++] = "/sbin/fsck"; + r = find_executable("fsck", &fsck_name); + if (r < 0) + return r; + cmdline[i++] = fsck_name; cmdline[i++] = arg_repair; cmdline[i++] = "-T";