/lib/partman/init.d/10umount_target is in ubiquity 2.10.16.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #!/bin/sh
set -e
# base-installer bind mounts /target/dev on /dev/.static/dev
# unmount if mounted on same device as /target
mp_stdev=$(grep -E '^[^ ]+ /dev/\.static/dev' /proc/mounts | cut -d" " -f1)
if [ "$mp_stdev" ] && grep -q "^$mp_stdev /target" /proc/mounts; then
umount /dev/.static/dev
fi
cat /proc/mounts |
while read dev dir type options dump pass; do
echo $dir
done |
grep '^/target' |
sort |
{
# We miss the option -r of sort
dirs=''
while read dir; do
dirs="$dir
$dirs"
done
echo -n "$dirs"
} |
while read dir; do
umount $dir
done
|