File: choices

package info (click to toggle)
partman-partitioning 48
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 880 kB
  • ctags: 21
  • sloc: sh: 782; makefile: 42
file content (39 lines) | stat: -rwxr-xr-x 742 bytes parent folder | download | duplicates (2)
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/definitions.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=$(stralign -25 "$RET")

if [ $bootable = yes ]; then
	db_metaget partman-partitioning/text/on description
	printf "unbootable\t%s%s\n" "$description" "${RET}"
else
	db_metaget partman-partitioning/text/off description
	printf "bootable\t%s%s\n" "$description" "${RET}"
fi