FS#25788 - [filesystem mkinitcpio] move of USB modprobe rule
Attached to Project:
Arch Linux
Opened by Matthias Dienstbier (fs4000) - Saturday, 27 August 2011, 11:36 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 09 October 2011, 23:55 GMT
Opened by Matthias Dienstbier (fs4000) - Saturday, 27 August 2011, 11:36 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 09 October 2011, 23:55 GMT
|
Details
In filesystem the USB modprobe rule was moved to /lib:
http://projects.archlinux.org/svntogit/packages.git/commit/filesystem/trunk?id=2b345129f35af2974c8c92322628ce3f2869dd84 Don't forget to reflect this change in mkinitcpio and release both at the same time: http://projects.archlinux.org/mkinitcpio.git/tree/install/base (line 14) |
This task depends upon
Closed by Dave Reisner (falconindy)
Sunday, 09 October 2011, 23:55 GMT
Reason for closing: Fixed
Additional comments about closing: mkinitcpio 0.7.4, filesystem 2011.10
Sunday, 09 October 2011, 23:55 GMT
Reason for closing: Fixed
Additional comments about closing: mkinitcpio 0.7.4, filesystem 2011.10
One thing to check before committing: How does add_file deal with missing files? In the future the /etc/modprobe.d/<...> file may or may not exist. Will it just be silently ignored if I try to add a non-existent file? Should it be?
https://github.com/falconindy/mkinitcpio/blob/master/functions#L233
If you add a file and it doesn't exist, you should be told as such.
[ -f "/etc/modprobe.d/usb-load-ehci-first.conf" ] && add_file "/etc/modprobe.d/usb-load-ehci-first.conf" || add_file "/lib/modprobe.d/usb-load-ehci-first.conf"
or
if [ -f "/etc/modprobe.d/usb-load-ehci-first.conf" ]; then
__add_file "/etc/modprobe.d/usb-load-ehci-first.conf"
else
__add_file "/lib/modprobe.d/usb-load-ehci-first.conf"
fi
- we use bash, not posix constructs in mkinitcpio
- there are undesirable side effects when using a compound command (especially in this case)
- we should be looking explicitly for the rule in /lib first, not /etc.
- __add_file requires 3 parameters or else it will fail. moreover, it should never be used by build-time hooks. add_file is much smarter.