> I don't know how to differentiate between if `manual_add_modules` was
called by a script in /usr/share/initramfs-tools or from outside.

I *think* you could have `manual_add_modules` check the environment for
something like `INITRAMFS_TOOLS_IN_USER_CONFIG=1` or something, and
change behaviour based on that. You'd not set it while executing files
in /usr/share/initramfs-tools, then you'd set it before executing the
scripts in user config directories.

> The only safer solution that I can come up with: Keep
`manual_add_modules` as it is and introduce a new function (e.g.
`manual_stage_modules`) that introduces the new behavior.

This would also work. This approach has the advantage that it's clearer
what's happening, and the disadvantages that it needs more work in other
packages to get the benefit and that it still changes the behaviour in
ways which theoretically might be visible to user configuration.

I don't have a strong opinion on which approach should be taken
(particularly: I've not *actually implemented* my solution, so it might
be infeasible).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2065180

Title:
  performance regression in dracut-install 060

To manage notifications about this bug go to:
https://bugs.launchpad.net/dracut/+bug/2065180/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to