@ -37,7 +37,7 @@ CMDLINE=$(cat /proc/cmdline)
# Scan CMDLINE for any specified real_root= or cdroot arguments
FAKE_ROOT=''
FAKE_INIT=''
REAL _ROOTFLAGS=''
FAKE _ROOTFLAGS=''
INIT_OPTS=''
ROOTFSTYPE='auto'
CRYPT_SILENT=0
@ -236,6 +236,9 @@ do
real_rootflags=*)
REAL_ROOTFLAGS=${x#*=}
;;
rootflags=*)
FAKE_ROOTFLAGS=${x#*=}
;;
rootfstype=*)
ROOTFSTYPE=${x#*=}
;;
@ -267,13 +270,20 @@ do
esac
done
if [ -z "${REAL_ROOT}" -a \( "${CDROOT}" = '0' \) -a \( "${FAKE_ROOT}" != "/dev/ram0" \) ]
then
REAL_ROOT="${FAKE_ROOT}"
fi
if [ -z "${REAL_INIT}" -a \( "${CDROOT}" = '0' \) -a \( "${FAKE_INIT}" != "/linuxrc" \) ]
if [ \( "${CDROOT}" = '0' \) ]
then
REAL_INIT="${FAKE_INIT}"
if [ -z "${REAL_ROOT}" -a \( "${FAKE_ROOT}" != "/dev/ram0" \) ]
then
REAL_ROOT="${FAKE_ROOT}"
fi
if [ -z "${REAL_INIT}" -a \( "${FAKE_INIT}" != "/linuxrc" \) ]
then
REAL_INIT="${FAKE_INIT}"
fi
if [ -z "${REAL_ROOTFLAGS}" ]
then
REAL_ROOTFLAGS="${FAKE_ROOTFLAGS}"
fi
fi
# Set variables based on the value of REAL_ROOT