]> git.99rst.org Git - openwrt-packages.git/commit
uvol: update to 1.2, expose volume operations over ubus
authorDaniel Golle <redacted>
Mon, 24 Aug 2026 02:06:28 +0000 (03:06 +0100)
committerDaniel Golle <redacted>
Mon, 24 Aug 2026 16:54:41 +0000 (17:54 +0100)
commit267a9c889256724ab8f9de81df5a306970e2555c
tree0c1c7c45dee4cc061787b4d7d87afb464ec7d637
parentf427fac2c4f4310d065445468e5d35da3a2ebc07
uvol: update to 1.2, expose volume operations over ubus

Move the storage backend probe, the ctx construction, the locking
helpers and the volume-name check out of the CLI script into
/usr/lib/uvol/common.uc, so a second entry point can reuse them
without duplicating the logic.

Publish ubus object 'uvol' with the volume operations and a readiness
query. Consumers such as uxc are pure ubus frontends and must not exec
the command line tool. Ship an rpcd exec plugin, installed by the uvol
package itself, taking the same locks as the CLI so both entry points
stay serialised. As stdout is the plugin's reply channel, point file
descriptor 1 at stderr for the duration of a call.

Send a 'uvol.ready' ubus event at the end of 'uvol boot', carrying the
active backend name and whether the .meta volume is ready. Consumers
such as uxc can wait for this event instead of polling volume state.
Sending is best-effort: boot keeps its exit code even when ubusd is
not reachable.

Signed-off-by: Daniel Golle <redacted>
utils/uvol/Makefile
utils/uvol/files/common.uc [new file with mode: 0644]
utils/uvol/files/uvol
utils/uvol/files/uvol-rpcd [new file with mode: 0644]
git clone https://git.99rst.org/PROJECT