0
0
mirror of https://github.com/openwrt/packages.git synced 2025-02-07 05:49:50 +00:00
packages/utils/uvol/files/uvol.init
Daniel Golle 3959a9b22c uvol: unbreak if LVM is installed but unused
Fix and simplify console output, make sure uvol doesn't break in case
of LVM being installed but not used.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-04-13 18:01:49 +01:00

22 lines
348 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
}