From: Rafał Miłecki <ra...@milecki.pl> If mounting fails for whatever reason (like unsupported file system or something) hotplug.d scripts shouldn't be called.
Signed-off-by: Rafał Miłecki <ra...@milecki.pl> --- mount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mount.c b/mount.c index caf9d9d..803acc1 100644 --- a/mount.c +++ b/mount.c @@ -160,8 +160,8 @@ static void mount_add_list(char *name, char *dev, char *serial, snprintf(tmp, 64, "%s%s", uci_path, name); snprintf(tmp2, 64, "/tmp/run/mountd/%s", dev); symlink(tmp2, tmp); - mount_new("/tmp/run/mountd/", dev); - system_printf("ACTION=add DEVICE=%s NAME=%s /sbin/hotplug-call mount", dev, name); + if (!mount_new("/tmp/run/mountd/", dev)) + system_printf("ACTION=add DEVICE=%s NAME=%s /sbin/hotplug-call mount", dev, name); } } -- 2.11.0 _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev