/bin/get_mountoptions is in ubiquity 2.18.7.
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 30 31 32 33 34 35 36 37 | #!/bin/sh
. /usr/share/debconf/confmodule
dev=$1
id=$2
part=$dev/$id
filesystem=$(cat $part/acting_filesystem)
os=$(udpkg --print-os)
cd $dev
optionsfiles=''
if [ -f /lib/partman/mountoptions/$filesystem.$os ] ; then
optionsfiles="/lib/partman/mountoptions/$filesystem.$os"
else
optionsfiles="/lib/partman/mountoptions/$filesystem"
fi
devtype=${dev#*=dev=}
devtype=${devtype%[0-9]*}
if [ -f /lib/partman/mountoptions/$devtype ] ; then
optionsfiles="$optionsfiles /lib/partman/mountoptions/$devtype"
fi
options=''
for op in $(cat $optionsfiles); do
if [ -f $part/options/$op ]; then
options="${options:+$options,}$op"
fi
done
if [ -z "$options" ]; then
options=defaults
fi
echo $options
|