@ -1200,70 +1200,6 @@ setup_squashfs_aufs() {
)
}
setup_unionfs() {
local rw_dir=$1
local ro_dir=$2
if [ "${USE_UNIONFS_NORMAL}" = '1' ]
then
# Directory used for rw changes in union mount filesystem
UNION=/union
# MEMORY=/memory
# if [ -z "$UID" ]
# then
# CHANGES=$MEMORY/unionfs_changes/default
# else
# CHANGES=$MEMORY/unionfs_changes/$UID
# fi
# mkdir -p ${MEMORY}
mkdir -p ${UNION}
good_msg "Loading fuse module"
modprobe fuse > /dev/null 2>&1
# if [ -n "${UNIONFS}" ]
# then
# CHANGESDEV=${UNIONFS}
# good_msg "mounting $CHANGESDEV to $MEMORY for unionfs support"
# mount -t auto $CHANGESDEV $MEMORY
# # mount tmpfs only in the case when changes= boot parameter was
# # empty or we were not able to mount the storage device
# ret=$?
# if [ ${ret} -ne 0 ]
# then
# bad_msg "mount of $CHANGESDEV failed falling back to ramdisk based unionfs"
# mount -t tmpfs tmpfs $MEMORY
# fi
# if [ "${CDROOT}" -eq '1' -a ! -f ${MEMORY}/livecd.unionfs ]
# then
# umount $MEMORY
# bad_msg "failed to find livecd.unionfs file on $CHANGESDEV"
# bad_msg "create a livecd.unionfs file on this device if you wish to use it for unionfs"
# bad_msg "falling back to ramdisk based unionfs for safety"
# mount -t tmpfs tmpfs $MEMORY
# fi
# else
# good_msg "Mounting ramdisk to $MEMORY for unionfs support..."
# mount -t tmpfs tmpfs $MEMORY
# fi
mkdir /tmp
mkdir -p ${UNION}
# mkdir -p $CHANGES
# mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION}
good_msg "Creating union mount"
unionfs -o allow_other,cow,noinitgroups,suid,dev,default_permissions,use_ino ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null
ret=$?
if [ ${ret} -ne 0 ]
then
bad_msg "Can't setup union mount!"
USE_UNIONFS_NORMAL=0
fi
[ ! -d "${NEW_ROOT}${CDROOT_PATH}" ] && mkdir -p "${NEW_ROOT}${CDROOT_PATH}"
mount --bind "${CDROOT_PATH}" "${NEW_ROOT}${CDROOT_PATH}"
else
USE_UNIONFS_NORMAL=0
fi
}
get_mounts_list()
{
awk '