Fix docache (bug #397309)

cleanup-cruft
Sebastian Pipping 13 years ago
parent 4ed04331a5
commit 8ac8de6055

@ -5,6 +5,10 @@
# Distributed under the GPL v2 # Distributed under the GPL v2
# $Id$ # $Id$
17 Mar 2012; Sebastian Pipping <sping@gentoo.org> defaults/initrd.scripts,
defaults/linuxrc:
Fix docache (bug #397309)
16 Mar 2012; Sebastian Pipping <sping@gentoo.org> defaults/initrd.scripts, 16 Mar 2012; Sebastian Pipping <sping@gentoo.org> defaults/initrd.scripts,
defaults/linuxrc: defaults/linuxrc:
Drop into debug shell when squashfs could not be mounted Drop into debug shell when squashfs could not be mounted

@ -191,12 +191,11 @@ cache_cd_contents() {
cp -a ${CDROOT_PATH}/${LOOP} ${NEW_ROOT}/mnt/${LOOP} cp -a ${CDROOT_PATH}/${LOOP} ${NEW_ROOT}/mnt/${LOOP}
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
bad_msg "Failed to cache the loop file! Lack of space?" warn_msg "Failed to cache the loop file! Lack of RAM?"
rm -rf ${NEW_ROOT}/mnt/${LOOP} 2>/dev/null
rm -rf ${NEW_ROOT}/mnt/livecd.* 2>/dev/null rm -rf ${NEW_ROOT}/mnt/livecd.* 2>/dev/null
rm -rf ${NEW_ROOT}/mnt/image.* 2>/dev/null rm -rf ${NEW_ROOT}/mnt/image.* 2>/dev/null
rm -rf ${NEW_ROOT}/mnt/zisofs 2>/dev/null rm -rf ${NEW_ROOT}/mnt/zisofs 2>/dev/null
else
LOOPEXT='../'
fi fi
fi fi
fi fi

@ -627,7 +627,12 @@ then
then then
if [ "${USE_AUFS_NORMAL}" != '1' ]; then if [ "${USE_AUFS_NORMAL}" != '1' ]; then
good_msg 'Mounting squashfs filesystem' good_msg 'Mounting squashfs filesystem'
mount -t squashfs -o loop,ro "${CDROOT_PATH}/${LOOPEXT}${LOOP}" "${NEW_ROOT}/mnt/livecd" || { _CACHED_SQUASHFS_PATH="${NEW_ROOT}/mnt/${LOOP}"
_squashfs_path="${CDROOT_PATH}/${LOOPEXT}${LOOP}" # Default to uncached
# Upgrade to cached version if possible
[ "${DO_cache}" -a -f "${_CACHED_SQUASHFS_PATH}" ] \
&& _squashfs_path=${_CACHED_SQUASHFS_PATH}
mount -t squashfs -o loop,ro "${_squashfs_path}" "${NEW_ROOT}/mnt/livecd" || {
bad_msg "Squashfs filesystem could not be mounted, dropping into shell." bad_msg "Squashfs filesystem could not be mounted, dropping into shell."
if [ -e /proc/filesystems ]; then if [ -e /proc/filesystems ]; then
fgrep -q squashfs /proc/filesystems || \ fgrep -q squashfs /proc/filesystems || \

Loading…
Cancel
Save