Hi, On Thu, 14 Dec 2017, Benjamin Drung wrote: > initramfs-tools support hooks for top, premount, bottom when booting > with boot=local or boot=nfs. Please add similar support to live-boot > when booting with boot=live. A patch (for git) is attached.
I will gladly apply your patch but I think it's time to clean up the mess with this: > --- a/components/9990-initramfs-tools.sh > +++ b/components/9990-initramfs-tools.sh > @@ -73,3 +73,25 @@ panic() > . /scripts/functions > panic "$@" > } > + > +# Note: Other components source /scripts/functions before sourcing this file. > +# /scripts/functions overrides the mount_* functions (to no-ops). Thus fix > +# the mount_* options here again. This kind of duplication is just ugly. I looked around and saw this: $ grep -r -E 'functions|9990-initramfs-tools.sh' components/ components/9990-initramfs-tools.sh:# Override maybe_break from scripts/functions components/9990-initramfs-tools.sh: . /scripts/functions components/9990-initramfs-tools.sh:# Override panic from scripts/functions components/9990-initramfs-tools.sh: . /scripts/functions components/9990-fstab.sh: # FIXME: stop hardcoding overloading of initramfs-tools functions components/9990-fstab.sh: . /scripts/functions components/9990-fstab.sh: . /lib/live/boot/9990-initramfs-tools.sh components/9990-misc-helpers.sh: # the output of setup_loop is evaluated in other functions, components/9990-netbase.sh: # FIXME: stop hardcoding overloading of initramfs-tools functions components/9990-netbase.sh: . /scripts/functions components/9990-netbase.sh: . /lib/live/boot/9990-initramfs-tools.sh I have the feeling that all those problematic include are no longer necessary nowadays because we first source all the files and then we execute functions in the expected order. My review has not been thorough but can you try to remove all those include and see if things still work? /script/functions is already sourced in backend/initramfs-tools/live.script so it should not be required to have it in the components, right? BTW, I merged all you other patches. For the future, please send patches as merge requests on the salsa repositories. The only correction I made in multiple places is replacing "${VAR-foo}" with "${VAR:-foo}". This gives a default value also when the variable is set to an empty value. Cheers, -- Raphaël Hertzog ◈ Debian Developer Support Debian LTS: https://www.freexian.com/services/debian-lts.html Learn to master Debian: https://debian-handbook.info/get/