From: Jo-Philipp Wich Date: Tue, 3 Dec 2013 18:14:48 +0000 (+0000) Subject: mount_root: try both $prefix/sbin/block and /sbin/block, fixes extroot with builtin... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=34c1eef60a7ac9be72c0eb385488593626542a45;p=project%2Fubox.git mount_root: try both $prefix/sbin/block and /sbin/block, fixes extroot with builtin block-mount --- diff --git a/mount_root.c b/mount_root.c index 8868e40..cfa48c3 100644 --- a/mount_root.c +++ b/mount_root.c @@ -697,7 +697,12 @@ static int extroot(const char *prefix) sprintf(block_path, "%s/sbin/block", prefix); if (stat(block_path, &s)) - return -1; + { + sprintf(block_path, "/sbin/block"); + + if (stat(block_path, &s)) + return -1; + } sprintf(kmod_loader, "/sbin/kmodloader %s/etc/modules-boot.d/ %s", prefix, prefix); system(kmod_loader);