From f309671f78d45e3dfe44eb65cae9970ae0bebdab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=AA=20de=20Souza=20Pinto?= Date: Tue, 21 Jan 2025 17:16:07 +0100 Subject: [PATCH] storage-init.sh: Fix /dev/root checking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit storage-init.sh considers that /dev/root will be always a symbolic link, which is not true for some platforms, such as in some NVIDIA devices, where /dev/root it's just a regular file block device. This commit adds a check for special block device for /dev/root. Signed-off-by: RenĂª de Souza Pinto --- pkg/storage-init/storage-init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/storage-init/storage-init.sh b/pkg/storage-init/storage-init.sh index 140447864a..f26ae5a682 100755 --- a/pkg/storage-init/storage-init.sh +++ b/pkg/storage-init/storage-init.sh @@ -276,7 +276,7 @@ for BLK_DEVICE in $BLK_DEVICES; do done #Recording SMART details to a file -if [ -L /dev/root ] ; then +if [ -L /dev/root ] || [ -b /dev/root ] ; then DEV_TO_CHECK_SMART=/dev/root else DEV_TO_CHECK_SMART=$(grep -m 1 /persist < /proc/mounts | cut -d ' ' -f 1)