Comment 44 for bug 2065180

Revision history for this message
Chris Halse Rogers (raof) wrote :

I'm not a bash expert by any means, but something like this would appear to work?
```
function manual_add_modules() {
   ... normal stuff goes here ...
   if [ $IN_USER_CONFIG -gt 0 ]; then
      apply_add_modules
   fi
}
...

in mkinitramfs:

...
IN_USER_CONFIG=0

...

apply_add_modules
run_scripts_optional /usr/share/initramfs-tools/hooks
apply_add_modules
IN_USER_CONFIG=1
run_scripts_optional "${CONFDIR}"/hooks...
...
```

(I am also reviewing the existing upload)