And here's the patch for partman-md to ensure that flags are exclusive
where reasonable...
--
David Härdeman
Index: debian/changelog
===================================================================
--- debian/changelog (revision 45641)
+++ debian/changelog (working copy)
@@ -1,3 +1,10 @@
+partman-md (33) UNRELEASED; urgency=low
+
+ * Make sure that the lvm, raid and swap flags are used in a mutually
+ exclusive manner.
+
+ -- David Härdeman <[EMAIL PROTECTED]> Sat, 3 Mar 2007 03:03:21 +0100
+
partman-md (32) unstable; urgency=low
[ Updated translations ]
Index: update.d/md_sync_flag
===================================================================
--- update.d/md_sync_flag (revision 45641)
+++ update.d/md_sync_flag (working copy)
@@ -41,13 +41,28 @@
done
close_dialog
+# Some flags make no sense in combination with raid
+cleanflags=''
+for $flag in $flags; do
+ if [ "$flag" = lvm ]; then
+ continue
+ elif [ "$flag" = swap ]; then
+ continue
+ elif [ -n "$cleanflags" ]; then
+ cleanflags="$cleanflags
+$flag"
+ else
+ cleanflags="$flag"
+ fi
+done
+
if [ "$method" = '' -a "$has_raid" = yes ]; then
echo raid >$dev/$id/method
rm -f $dev/$id/use_filesystem
rm -f $dev/$id/format
elif [ "$method" = raid -a "$has_raid" = no ]; then
open_dialog SET_FLAGS $id
- write_line "$flags"
+ write_line "$cleanflags"
write_line raid
write_line NO_MORE
close_dialog