Fix regression introduced with migration to fs-tools.
The old ubox based exroot did a fall back to /sbin/block if $cfg/sbin/block
did not exist.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
sprintf(ldlib_path, "%s/lib", extroot_prefix);
sprintf(block_path, "%s/sbin/block", extroot_prefix);
sprintf(ldlib_path, "%s/lib", extroot_prefix);
sprintf(block_path, "%s/sbin/block", extroot_prefix);
- if (stat(block_path, &s))
- return -1;
+ if (stat(block_path, &s)) {
+ sprintf(block_path, "/sbin/block");
+ if (stat(block_path, &s))
+ return -1;
+ }
sprintf(kmod_loader, "/sbin/kmodloader %s/etc/modules-boot.d/ %s", extroot_prefix, extroot_prefix);
system(kmod_loader);
sprintf(kmod_loader, "/sbin/kmodloader %s/etc/modules-boot.d/ %s", extroot_prefix, extroot_prefix);
system(kmod_loader);