[OpenWrt-Devel] Problem with blockd starting after partitions mounting
bobafetthotmail at gmail.com
Sun Dec 29 15:49:54 EST 2019
On 29/12/19 15:35, Rafał Miłecki wrote:
> A year ago I introduced hotplug.d script meant to manage Samba shares
> in a clever way by:
> 1) Using "mount" hotplug.d event
> 2) Getting mount info from blockd
> Relevant commit ef1efa756e0d ("samba36: add package with hotplug.d
> script for auto sharing"):
> Today I realized it doesn't work for partitions mounted at boot time
> as blockd isn't running then and "ubus call block info" simply fails.
> "mount" hotplug.d events at boot time are generated by:
> 1) /etc/hotplug.d/block/10-mount calling /sbin/block hotplug
> 2) /sbin/block hotplug calling /sbin/hotplug-call mount
> So it's not a matter of init.d order and adjusting START in
> /etc/init.d/blockd (block devices appear EARLY).
> Any idea how to solve this problem? Should we maybe postpone "mount"
> events? E.g. until "blockd" start? Or should hotplug.d script somehow
> wait until "blockd" starts?
Either that or parsing the output of "block info"
The latter provides mount info (among others) and does not need blockd.
But it's not json so you will have to parse it differently, or add the
ability to produce json to block.
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel