mount_root: try both $prefix/sbin/block and /sbin/block, fixes extroot with builtin...
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 3 Dec 2013 18:14:48 +0000 (18:14 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 8 Feb 2014 18:11:22 +0000 (18:11 +0000)
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))
        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);
 
        sprintf(kmod_loader, "/sbin/kmodloader %s/etc/modules-boot.d/ %s", prefix, prefix);
        system(kmod_loader);