mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
init: Take over handling of rootdelay parameter from udev boot script
The rootdelay parameter used to be important as a workaround for our crappy device scanning. It's less widely needed now but still needed for some md-RAID configurations. The delay used to be implemented in udev's init-top script, but was removed from there in Debian version 220-4 and the systemd maintainers do not want to restore it. So implement it in init, where it probably always should have been. I would like to un-export ROOTDELAY now, but several other packages use it to control their own delay or polling. For now, document it as deprecated. To avoid doubling the delay when using an older udev, make mkinitramfs patch it out of the udev init-top script. Closes: #809740 Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
parent
49e4a0555f
commit
ab9130667d
4
init
4
init
@ -207,6 +207,10 @@ maybe_break modules
|
||||
load_modules
|
||||
[ "$quiet" != "y" ] && log_end_msg
|
||||
|
||||
if [ "$ROOTDELAY" ]; then
|
||||
sleep $ROOTDELAY
|
||||
fi
|
||||
|
||||
maybe_break premount
|
||||
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-premount"
|
||||
run_scripts /scripts/init-premount
|
||||
|
||||
@ -559,6 +559,8 @@ Otherwise keep it alone.
|
||||
.TP
|
||||
\fB\fI ROOTDELAY, ROOTFLAGS, ROOTFSTYPE, IP
|
||||
corresponds to the rootdelay, rootflags, rootfstype or ip boot option.
|
||||
Use of ROOTDELAY is deprecated; you should implement a \fIlocal-block\fR
|
||||
boot script rather than delaying or polling.
|
||||
.TP
|
||||
\fB\fI DPKG_ARCH
|
||||
allows arch specific boot actions.
|
||||
|
||||
@ -296,6 +296,9 @@ fi
|
||||
run_scripts /usr/share/initramfs-tools/hooks
|
||||
run_scripts "${CONFDIR}"/hooks
|
||||
|
||||
# Avoid double sleep when using older udev scripts
|
||||
sed -i 's/^\s*sleep \$ROOTDELAY$/:/' "${DESTDIR}/scripts/init-top/udev"
|
||||
|
||||
# cache boot run order
|
||||
for b in $(cd "${DESTDIR}/scripts" && find . -mindepth 1 -type d); do
|
||||
cache_run_scripts "${DESTDIR}" "/scripts/${b#./}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user