From eec4397e4125a29119279c9296de8e310adc8599 Mon Sep 17 00:00:00 2001 From: Peter Hjalmarsson Date: Wed, 8 Jun 2011 17:49:23 +0200 Subject: [PATCH] Check content of $REAL_ROOT/dev after we are done with it Removes error message about missing /dev/console and /dev/null --- defaults/linuxrc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/defaults/linuxrc b/defaults/linuxrc index ad6d780..57f26fd 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -725,13 +725,6 @@ fi verbose_kmsg echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)${NORMAL}" -if [ ! -e "${CHROOT}/dev/console" ] || [ ! -e "${CHROOT}/dev/null" ] -then - echo -ne "${BAD}>>${NORMAL}${BOLD} ERROR: your real /dev is missing files required to boot (console and null)${NORMAL}" -elif [ -e /etc/initrd.splash -a ! -e "${CHROOT}/dev/tty1" ] -then - echo -ne "${BAD}>>${NORMAL}${BOLD} ERROR: your real /dev is missing tty1, which is required for splash${NORMAL}" -fi cd "${CHROOT}" mkdir "${CHROOT}/proc" "${CHROOT}/sys" 2>/dev/null @@ -750,6 +743,14 @@ do fi done +if [ ! -e "${CHROOT}/dev/console" ] || [ ! -e "${CHROOT}/dev/null" ] +then + echo -ne "${BAD}>>${NORMAL}${BOLD} ERROR: your real /dev is missing files required to boot (console and null)${NORMAL}" +elif [ -e /etc/initrd.splash -a ! -e "${CHROOT}/dev/tty1" ] +then + echo -ne "${BAD}>>${NORMAL}${BOLD} ERROR: your real /dev is missing tty1, which is required for splash${NORMAL}" +fi + echo -e "${BOLD}.${NORMAL}" exec /sbin/switch_root -c "/dev/console" "${CHROOT}" "${REAL_INIT:-/sbin/init}" "${INIT_OPTS}" -- 2.26.2