How make this for OpenWrt?

as in the title:

automount - autoshare

I think it's interesting

Enable storage auto mount and share the parent directory:

autoshare ? nothing

You only need to share the directory that includes all auto-generated mount points.
Use any sharing protocol that suits your needs, e.g. SFTP, NFS, SMB, etc.

I'm going to watch this carefully but I had never managed to get it to work properly

if for example I have several USB keys connected and if I disconnect them in windows the explorer continues to see them while the disks should disappear
I also have ubi_0 & ubiblock0_0 too many

otherwise it would be practical if we had the shares with the name of the disk instead of sda1 , sdc1, sdx, ... as it exists with Windows (obviously if a name exists such as ESD-ISO (M:) )

2

If disconnected disks leave empty directories, you can remove them with Hotplug:

cat << "EOF" > /etc/hotplug.d/block/99-custom
if [ "${ACTION}" = "remove" ]
then rmdir --ignore-fail-on-non-empty /mnt/*
fi
EOF

With some scripting, you can also make Hotplug create Samba shares for connected disks.

good... , you have to do scripts, etc.
so this amounts to doing exactly what I was asking at the beginning with OpenWrt

automount - autoshare

@vgaetera
sorry off topic. can I please ask your contributions here:
https://forum.openwrt.org/t/verify-vgaetera-commands-to-disable-ipv6/156948