call_func_timeout permits us to call a helper function and kill it
should it exceed some timeout. This is derived from example code posted
on Stack Overflow:
http://stackoverflow.com/a/11056286
Signed-off-by: Richard Yao <ryao@gentoo.org>
Conflicts:
defaults/initrd.scripts
zpool.cache and zdev.conf are optional files, so instead of warning when
they are missing, we print a message when they are copied.
Signed-off-by: Richard Yao <ryao@gentoo.org>
At least one kernel configuration generates an addition module that we
need to load for USB 3.0 support, so lets load it.
Reported-by: Robin Johnson <robbat2@gentoo.org>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Users were seeing the following error message printed:
cp: cannot stat ‘/etc/zfs/zdev.conf’: No such file or directory
Both zdev.conf and zpool.cache are optional files. We print a warning
when they are absent, but cp printed its own error in addition to our
warning. We suppress that.
Signed-off-by: Richard Yao <ryao@gentoo.org>
udev may still be processing rules and this can cause very bad
things. For instance, modules_load may have loaded an usb host
controller driver and we must wait for the udev rules to terminate.
However, this may lead to other race conditions, but we have
observed that adding scandelay=n where n >= 5 actually fixes the
issue of booting off USB under certain scenarios.
Crapping with .config thinking to be smarter than the user is just
stupid and can lead to sudden and unexpected compile/config failure.
Just DONT FUCKING TOUCH TEH CONFIGGGGGGGGGGG!
Some executables (namely: udevadm) may link against libraries in
non-standard paths. For this reason, and as dracut does, we must
copy /etc/ld.so.conf{.d/*,} over and generate a custom ld.so.cache
file.