linuxrc: move REAL_ROOT* setup to setup_real_root()

master
Fabio Erculiani 12 years ago
parent d8af91e3e8
commit 613a7047a1

@ -209,6 +209,23 @@ uppercase() {
echo $1 | tr 'a-z' 'A-Z'
}
setup_real_root() {
if [ "${CDROOT}" = '0' ]
then
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
}
findmediamount() {
# $1 = mount dir name / media name

@ -244,21 +244,7 @@ done
quiet_kmsg
if [ "${CDROOT}" = '0' ]
then
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
setup_real_root
zfs_init

Loading…
Cancel
Save