mount_root: try both $prefix/sbin/block and /sbin/block, fixes extroot with builtin...
[project/ubox.git] / mount_root.c
index 8868e40..cfa48c3 100644 (file)
@@ -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);