[oe-commits] [openembedded-core] 20/49: initramfs-framework: rootfs: add support for LABEL

git at git.openembedded.org git at git.openembedded.org
Thu Feb 15 21:51:42 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 9285261b4d9fe2e134e6d4759b499f3a2386bd11
Author: Ricardo Salveti <ricardo at opensourcefoundries.com>
AuthorDate: Thu Feb 8 23:41:18 2018 -0200

    initramfs-framework: rootfs: add support for LABEL
    
    The rootfs can also be found via the partition label.
    
    Signed-off-by: Ricardo Salveti <ricardo at opensourcefoundries.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/recipes-core/initrdscripts/initramfs-framework/rootfs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
index 14768f1..76fa84d 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
@@ -31,6 +31,11 @@ rootfs_run() {
 				bootparam_root="/dev/disk/by-partuuid/$root_uuid"
 			fi
 
+			if [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then
+				root_label=`echo $bootparam_root | cut -c7-`
+				bootparam_root="/dev/disk/by-label/$root_label"
+			fi
+
 			if [ -e "$bootparam_root" ]; then
 				flags=""
 				if [ -n "$bootparam_ro" ] && ! echo "$bootparam_rootflags" | grep -w -q "ro"; then

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list