[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#389881: RC-ness of this bug

On Thu, Mar 08, 2007 at 12:44:05AM +0100, David Härdeman wrote:
> I've attached a patch which implements persistent device names in 
> partman by checking for devices which are mounted under /target and 
> which have a suitable link in /dev/disk/by-id/*

I've attached the Ubuntu patch for the same issue; it's been deployed
for some time and I think it's largely a cleaner approach than fixing it
up post-facto as your patch does. However, I tend to agree with Steve
that doing that at the last minute is risky; we had a fair few little
bits and pieces around the distribution to fix up, IIRC.

Colin Watson                                       [cjwatson@debian.org]
diff -Nru /tmp/bRFBYZWEev/partman-target-46/finish.d/fstab_hd_entries /tmp/gRV1OOc9kY/partman-target-46ubuntu2/finish.d/fstab_hd_entries
--- /tmp/bRFBYZWEev/partman-target-46/finish.d/fstab_hd_entries	2006-07-25 23:51:30.000000000 +0100
+++ /tmp/gRV1OOc9kY/partman-target-46ubuntu2/finish.d/fstab_hd_entries	2007-02-15 12:27:59.000000000 +0000
@@ -13,9 +13,18 @@
     sort |
     while read mp fs type options dump pass; do
 	case "$fs" in
-	    (/*)
+	    (/dev/disk/*|/dev/fd[0-9]*|/dev/mapper/*|/dev/evms/*|/dev/md[0-9]*)
 		printf "%-15s %-15s %-7s %-15s %-7s %s\n" "$(mapdevfs $fs)" "${mp}" "$type" "$options" "$dump" "$pass"
+	    (/*)
+		uuid="$(PATH="/lib/udev:$PATH" vol_id -u $fs)"
+		if [ "$uuid" ]; then
+		    printf "# %s\n" "$(mapdevfs $fs)"
+		    printf "%-15s %-15s %-7s %-15s %-7s %s\n" "UUID=$uuid" "${mp}" "$type" "$options" "$dump" "$pass"
+		else
+		    printf "%-15s %-15s %-7s %-15s %-7s %s\n" "$(mapdevfs $fs)" "${mp}" "$type" "$options" "$dump" "$pass"
+		fi
+		;;

Reply to: