diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index ac33442..386ddf1 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -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 diff --git a/defaults/linuxrc b/defaults/linuxrc index 2951384..30b0b92 100644 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -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