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
|
#!/bin/sh
. /lib/partman/lib/base.sh
dev=$1
id=$2
cd $dev
valid_boot=no
open_dialog VALID_FLAGS $id
while { read_line flag; [ "$flag" ]; }; do
if [ "$flag" = boot ]; then
valid_boot=yes
fi
done
close_dialog
[ $valid_boot = yes ] || exit 0
bootable=no
open_dialog GET_FLAGS $id
while { read_line flag; [ "$flag" ]; }; do
if [ "$flag" = boot ]; then
bootable=yes
fi
done
close_dialog
db_metaget partman-partitioning/text/bootable description
description="$RET"
if [ $bootable = yes ]; then
db_metaget partman-partitioning/text/on description
printf "unbootable\t%s\${!TAB}%s\n" "$description" "${RET}"
else
db_metaget partman-partitioning/text/off description
printf "bootable\t%s\${!TAB}%s\n" "$description" "${RET}"
fi
|