Commit ef33f6ab authored by Tails developers's avatar Tails developers
Browse files

Use /live/rofs/... (from live-boot 3.x) instead of mounting the squashfs.

parent 33926e3f
......@@ -9,8 +9,7 @@ LOCK=/var/lock/${CMD}
TEXTDOMAIN="${CMD}"
export TEXTDOMAIN
SQUASH=/live/image/live/filesystem.squashfs
ROFS=/live/rofs
ROFS=/live/rofs/filesystem.squashfs
CONF_DIR=/var/lib/unsafe-browser
COW=${CONF_DIR}/cow
CHROOT=${CONF_DIR}/chroot
......@@ -40,7 +39,7 @@ cleanup () {
counter=$((${counter}+1))
done
[ ${ret} -eq 0 ] || pkill -9 -u ${CLEARNET_USER} 1>/dev/null 2>&1
for mnt in ${CHROOT}/dev ${CHROOT}/proc ${CHROOT} ${COW} ${ROFS}; do
for mnt in ${CHROOT}/dev ${CHROOT}/proc ${CHROOT} ${COW}; do
counter=0
while [ "${counter}" -le 10 ] && mountpoint -q ${mnt} 2>/dev/null; do
umount ${mnt} 2>/dev/null
......@@ -48,7 +47,7 @@ cleanup () {
counter=$((${counter}+1))
done
done
rmdir ${ROFS} ${COW} ${CHROOT} 2>/dev/null
rmdir ${COW} ${CHROOT} 2>/dev/null
}
error () {
......@@ -91,8 +90,7 @@ setup_chroot () {
trap cleanup INT
trap cleanup EXIT
mkdir -p ${ROFS} ${COW} ${CHROOT} && \
mount -t squashfs -o loop ${SQUASH} ${ROFS} && \
mkdir -p ${COW} ${CHROOT} && \
mount -t tmpfs tmpfs ${COW} && \
mount -t aufs -o noatime,noxino,dirs=${COW}=rw:${ROFS}=rr+wh aufs ${CHROOT} && \
mount -t proc proc ${CHROOT}/proc && \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment