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} ...@@ -9,8 +9,7 @@ LOCK=/var/lock/${CMD}
TEXTDOMAIN="${CMD}" TEXTDOMAIN="${CMD}"
export TEXTDOMAIN export TEXTDOMAIN
SQUASH=/live/image/live/filesystem.squashfs ROFS=/live/rofs/filesystem.squashfs
ROFS=/live/rofs
CONF_DIR=/var/lib/unsafe-browser CONF_DIR=/var/lib/unsafe-browser
COW=${CONF_DIR}/cow COW=${CONF_DIR}/cow
CHROOT=${CONF_DIR}/chroot CHROOT=${CONF_DIR}/chroot
...@@ -40,7 +39,7 @@ cleanup () { ...@@ -40,7 +39,7 @@ cleanup () {
counter=$((${counter}+1)) counter=$((${counter}+1))
done done
[ ${ret} -eq 0 ] || pkill -9 -u ${CLEARNET_USER} 1>/dev/null 2>&1 [ ${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 counter=0
while [ "${counter}" -le 10 ] && mountpoint -q ${mnt} 2>/dev/null; do while [ "${counter}" -le 10 ] && mountpoint -q ${mnt} 2>/dev/null; do
umount ${mnt} 2>/dev/null umount ${mnt} 2>/dev/null
...@@ -48,7 +47,7 @@ cleanup () { ...@@ -48,7 +47,7 @@ cleanup () {
counter=$((${counter}+1)) counter=$((${counter}+1))
done done
done done
rmdir ${ROFS} ${COW} ${CHROOT} 2>/dev/null rmdir ${COW} ${CHROOT} 2>/dev/null
} }
error () { error () {
...@@ -91,8 +90,7 @@ setup_chroot () { ...@@ -91,8 +90,7 @@ setup_chroot () {
trap cleanup INT trap cleanup INT
trap cleanup EXIT trap cleanup EXIT
mkdir -p ${ROFS} ${COW} ${CHROOT} && \ mkdir -p ${COW} ${CHROOT} && \
mount -t squashfs -o loop ${SQUASH} ${ROFS} && \
mount -t tmpfs tmpfs ${COW} && \ mount -t tmpfs tmpfs ${COW} && \
mount -t aufs -o noatime,noxino,dirs=${COW}=rw:${ROFS}=rr+wh aufs ${CHROOT} && \ mount -t aufs -o noatime,noxino,dirs=${COW}=rw:${ROFS}=rr+wh aufs ${CHROOT} && \
mount -t proc proc ${CHROOT}/proc && \ 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