packages/utils/uvol/files/uvol.init
Daniel Golle da00d71f55
uvol: ubi: fix bring-up of ro volumes
Fix bring-up of ro volumes on creation and on boot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-07-28 20:29:56 +01:00

23 lines
350 B
Bash

#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
NAME=uvol
PROG=/usr/sbin/uvol
start_service() {
[ "${__BOOT_UVOL}" = "1" ] && return 0
procd_open_instance "$NAME"
procd_set_param command "$PROG" boot
procd_close_instance
}
boot() {
__BOOT_UVOL=1
start
}
service_triggers() {
procd_add_raw_trigger "mount.ready" 200 /etc/init.d/uvol start
}