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

Bug#488322: support labeled mounts



Package: partman-ext3
Version: 52
Severity: wishlist
Tags: patch

This patch uses the "infrastructure" from #488321 to allow partitons to
be mounted by label instead of device name. Note that $id/labeled_mount
is currently only settable when doing auto partitioning but should this
patch look useful I can add the dialog field too.
 -- Guido
>From b40d74b1645aaaa607d9db65104d7e6a4bbf331a Mon Sep 17 00:00:00 2001
From: Guido Guenther <agx@sigxcpu.org>
Date: Fri, 27 Jun 2008 22:42:32 +0200
Subject: [PATCH] allow for labeled mounts

---
 packages/partman/partman-ext3/fstab.d/ext3 |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/packages/partman/partman-ext3/fstab.d/ext3 b/packages/partman/partman-ext3/fstab.d/ext3
index 2a064ee..b0d4d36 100755
--- a/packages/partman/partman-ext3/fstab.d/ext3
+++ b/packages/partman/partman-ext3/fstab.d/ext3
@@ -10,6 +10,10 @@ for dev in $DEVICES/*; do
 		[ $fs != free ] || continue
 		[ -f "$id/method" ] || continue
 		[ -f "$id/acting_filesystem" ] || continue
+		if [ -f "$id/labeled_mount" -a -s "$id/label" ]; then
+			label="LABEL="$(cat $id/label | \
+				sed 's/\(................\).*/\1/g')
+		fi
 		method=$(cat $id/method)
 		filesystem=$(cat $id/acting_filesystem)
 		case "$filesystem" in
@@ -31,7 +35,7 @@ for dev in $DEVICES/*; do
 			else
 				pass=2
 			fi
-			echo "$path" "$mountpoint" ext3 $options 0 $pass
+			echo "$path" "$mountpoint" ext3 $options 0 $pass $label
 			;;
 		esac
 	done
-- 
1.5.6


Reply to: