/lib/partman/storage_device/80label/do_option is in ubiquity 18.04.14.
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 38 39 40 41 42 | #!/bin/sh -e
. /lib/partman/lib/base.sh
. /lib/partman/lib/disk-label.sh
dev="$2"
cd $dev
[ -f size ] || exit 1
db_input critical partman-partitioning/confirm_new_label
db_go || exit 0
db_get partman-partitioning/confirm_new_label
if [ "$RET" = false ]; then
db_reset partman-partitioning/confirm_new_label
exit 1
fi
db_reset partman-partitioning/confirm_new_label
prepare_new_labels "$dev"
create_new_label "$dev" ""
partitions=''
open_dialog PARTITIONS
while { read_line num id size type fs path name; [ "$id" ]; }; do
partitions="$partitions $id"
done
close_dialog
for id in $partitions; do
update_partition $dev $id
done
open_dialog GET_LABEL_TYPE
read_line label_type
close_dialog
if [ "$label_type" = sun ]; then
backupdir=../../backup/$(basename $dev)
rm -rf "$backupdir"
cp -a . "$backupdir"
fi
|