Thanks, didn't catch that. Works perfect when sourced.
On Thu, Apr 30, 2015 at 2:16 PM, Toomas Tamm <tt-...@kky.ttu.ee> wrote: > On Thu, 2015-04-30 at 13:00 +0300, Alex Kiousis wrote: > >> Also because the hooks are executed in a sub-shell, we can't run >> set_disk_info in the hook because the changed value of the variable is >> discarded after the script exits. > > If you append ".source" to the name of the hook script (eg > partition.HPRAID.source), the hook script is sourced, rather than > executed in a sub-shell, and the variables you set should be preserved. > > Regards, > > Toomas Tamm > > >