}
_procd_add_action_mount_trigger() {
- local script=$(readlink "$initscript")
- local name=$(basename ${script:-$initscript})
local action="$1"
- local mpath
shift
+ local mountpoints="$(procd_get_mountpoints "$@")"
+ [ "${mountpoints//[[:space:]]}" ] || return 0
+ local script=$(readlink "$initscript")
+ local name=$(basename ${script:-$initscript})
_procd_open_trigger
- _procd_add_mount_trigger mount.add $action "$@"
+ _procd_add_mount_trigger mount.add $action "$mountpoints"
_procd_close_trigger
}
target="${target%%/}/"
[ "$path" != "${path##$target}" ] && echo "${target%%/}"
}
-
+ local mpath
config_load fstab
for mpath in "$@"; do
config_foreach __procd_check_mount mount "$mpath"
}
_procd_add_restart_mount_trigger() {
- local mountpoints="$(procd_get_mountpoints "$@")"
- [ "${mountpoints//[[:space:]]}" ] &&
- _procd_add_action_mount_trigger restart $mountpoints
+ _procd_add_action_mount_trigger restart "$@"
}
_procd_add_reload_mount_trigger() {
- local mountpoints="$(procd_get_mountpoints "$@")"
- [ "${mountpoints//[[:space:]]}" ] &&
- _procd_add_action_mount_trigger reload $mountpoints
+ _procd_add_action_mount_trigger reload "$@"
}
_procd_add_raw_trigger() {
procd_add_mount_trigger \
procd_add_reload_trigger \
procd_add_reload_interface_trigger \
+ procd_add_action_mount_trigger \
procd_add_reload_mount_trigger \
procd_add_restart_mount_trigger \
procd_open_trigger \