From ce6e83fe333622bc306cfb3c9b5822d8f6d9f213 Mon Sep 17 00:00:00 2001 From: Thomas Bächler Date: Sun, 7 Jun 2009 14:47:52 +0200 Subject: Always use rootdelay when polling a device, set it earlier in the init file --- hooks/resume | 2 +- init | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hooks/resume b/hooks/resume index 5e4d51b..0632fed 100644 --- a/hooks/resume +++ b/hooks/resume @@ -3,7 +3,7 @@ run_hook () { fmtdevice () { echo "${1}:${2}"; } - if [ -n "${resume}" ] && poll_device "${resume}"; then + if [ -n "${resume}" ] && poll_device "${resume}" ${rootdelay}; then # Try resuming with tuxonice tuxoniceroot="/sys/power/tuxonice" if [ -d "${tuxoniceroot}" ]; then diff --git a/init b/init index ad73b01..ee29725 100644 --- a/init +++ b/init @@ -63,6 +63,13 @@ for m in ${MODULES}; do fi done +# If rootdelay is empty or not a non-negative integer, set it to 10 +if [ -z "${rootdelay}" -o ! "${rootdelay}" -ge 0 ]; then + export rootdelay=10 +fi +# We'll wait for the root device, so make sure klibc doesn't +export kinit_params="${kinit_params} rootdelay=0" + if [ -e "/hooks" ]; then for h in ${HOOKS}; do TST="" @@ -84,13 +91,6 @@ if [ "${break}" = "y" ]; then PS1="ramfs$ " /bin/sh -i fi -# If rootdelay is empty or not a non-negative integer, set it to 10 -if [ -z "${rootdelay}" -o ! "${rootdelay}" -ge 0 ]; then - export rootdelay=10 - # We'll wait for the root device, so make sure klibc doesn't - export kinit_params="$kinit_params rootdelay=0" -fi - # If we boot from NFS, don't check for a block device in /dev # Let kinit do it all if [ -z "${nfsroot}" -a "${root}" != "/dev/nfs" ]; then -- cgit v1.2.3-24-g4f1b