Codebase list partman-partitioning / 0eb92b7
Disable "resize" and "delete" for partitions on "loop" For RAID, crypto and LVM devices only one partition can be handled at a time. As it makes no sense to resize or delete these kind of partitions, let's hide the options instead of tricking the users. As all these devices are using "loop" partition tables, that's our filtering criteria here. (Closes: #318228, #417973) r53585 Jérémy Bobbio 15 years ago
3 changed file(s) with 29 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
00 #!/bin/sh
11
2 . /usr/share/debconf/confmodule
2 . /lib/partman/lib/base.sh
3
4 dev=$1
5 id=$2
6 cd $dev
7
8 open_dialog GET_LABEL_TYPE
9 read_line label
10 close_dialog
11
12 # Disable on devices where there is no "real" partitioning
13 if [ "$label" = loop ]; then
14 exit 0
15 fi
316
417 db_metaget partman-partitioning/text/delete description
518 printf "delete\t${RET}\n"
6
44 dev=$1
55 id=$2
66 cd $dev
7
8 open_dialog GET_LABEL_TYPE
9 read_line label
10 close_dialog
11
12 # Disable on devices where there is no "real" partitioning
13 if [ "$label" = loop ]; then
14 exit 0
15 fi
716
817 if [ -f $id/detected_filesystem ]; then
918 fs=$(cat $id/detected_filesystem)
00 partman-partitioning (60) UNRELEASED; urgency=low
11
2 [ Colin Watson ]
23 * Silence warning in case $id/options already exists.
34 * Move 'local' down a line in create_new_partition in order to work
45 properly with bash, which initialises local variables without an
78 contents of /lib/partman/mountoptions/${fs}_defaults if it exists.
89 * Use explicit dummy variables in create_new_partition rather than
910 overriding $type, $size, et al.
11
12 [ Jérémy Bobbio ]
13 * Disable "resize" and "delete" for partitions on "loop" partition tables.
14 This will prevent unusable behaviour on RAID, crypto and LVM partitions.
15 (Closes: #318228, #417973)
1016
1117 -- Colin Watson <cjwatson@debian.org> Tue, 27 May 2008 10:17:15 +0100
1218