dynsize fixes
parent
6c6c6119b9
commit
39335c407f
|
|
@ -70,6 +70,12 @@ if [ "$1" = "--init" ]; then
|
||||||
umount -l $LINE
|
umount -l $LINE
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# then free up loop mounts, backwards
|
||||||
|
tac /proc/mounts | grep loop | cut -d " " -f 2 | while read LINE; do
|
||||||
|
umount $LINE >/dev/console 2>&1
|
||||||
|
umount -l $LINE
|
||||||
|
done
|
||||||
|
|
||||||
# and free up memory mounts, backwards
|
# and free up memory mounts, backwards
|
||||||
tac /proc/mounts | grep memory | cut -d " " -f 2 | while read LINE; do
|
tac /proc/mounts | grep memory | cut -d " " -f 2 | while read LINE; do
|
||||||
umount $LINE >/dev/console 2>&1
|
umount $LINE >/dev/console 2>&1
|
||||||
|
|
|
||||||
|
|
@ -339,16 +339,16 @@ persistent_changes()
|
||||||
echo "Activating dynamic sized storage for persistent changes" >&2
|
echo "Activating dynamic sized storage for persistent changes" >&2
|
||||||
rm "$T1" "$T2" 2>/dev/null
|
rm "$T1" "$T2" 2>/dev/null
|
||||||
mount.dynsizefs "$CHANGES/changes.idx" "$CHANGES/changes.dat" "$2"
|
mount.dynsizefs "$CHANGES/changes.idx" "$CHANGES/changes.dat" "$2"
|
||||||
if [ "$(device_bestfs "$2/dynsize.fs")" = "" ]; then
|
if [ "$(device_bestfs "$2/dynsize.fs" | tr -d " ")" = "-t" ]; then
|
||||||
mke2fs -b 4096 -F "$2/dynsize.fs" >/dev/null
|
mke2fs -F "$2/dynsize.fs" >/dev/null
|
||||||
fi
|
fi
|
||||||
mount -o loop "$2/dynsize.fs" "$2"
|
mount -o loop "$2/dynsize.fs" "$2"
|
||||||
|
rmdir "$2/lost+found"
|
||||||
else
|
else
|
||||||
echo_green_star
|
echo_green_star
|
||||||
echo "Activating native persistent changes" >&2
|
echo "Activating native persistent changes" >&2
|
||||||
mount --bind "$CHANGES" "$2"
|
mount --bind "$CHANGES" "$2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Copy data to RAM if requested
|
# Copy data to RAM if requested
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue