# Copyright 2006-2006 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 13 Nov 2006; Chris Gianelloni <wolf31o2@gentoo.org> generic/linuxrc:
+ Added patch from Tim Steiner <tsteiner@nerdclub.net> to add a real_rootflags
+ parameter for bug #122672.
+
13 Nov 2006; Chris Gianelloni <wolf31o2@gentoo.org>
generic/initrd.scripts, generic/linuxrc:
Added patch to support resuming from encrypted swap. The patch was submitted
# Scan CMDLINE for any specified real_root= or cdroot arguments
REAL_ROOT=''
FAKE_ROOT=''
+REAL_ROOTFLAGS=''
for x in ${CMDLINE}
do
case "${x}" in
crypt_swap\=*)
LUKS_SWAP=`parse_opt "${x}"`
;;
+ real_rootflags\=*)
+ REAL_ROOTFLAGS=`parse_opt "${x}"`
+ ;;
esac
done
# mount ro so fsck doesn't barf later
# REAL_ROOT_TYPE=`vol_id -t ${REAL_ROOT}`
# mount -t ${REAL_ROOT_TYPE} -o ro ${REAL_ROOT} ${NEW_ROOT}
- mount -o ro ${REAL_ROOT} ${NEW_ROOT}
+ if [ "${REAL_ROOTFLAGS}" = '' ]; then
+ mount -o ro ${REAL_ROOT} ${NEW_ROOT}
+ else
+ good_msg "Using mount -o ro,${REAL_ROOTFLAGS}"
+ mount -o ro,${REAL_ROOTFLAGS} ${REAL_ROOT} ${NEW_ROOT}
+ fi
fi
# If mount is successful break out of the loop