Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] nfsrootfs: disable warning message if bootargs root parameter have not been defined
@ 2025-06-19  8:29 Jimmy Ho
  2025-06-19 15:32 ` [OE-core] " Antonin Godard
  0 siblings, 1 reply; 6+ messages in thread
From: Jimmy Ho @ 2025-06-19  8:29 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin, Jimmy Ho

we have case that don't define root in bootargs,
if [ ${bootparam_root} != "/dev/nfs" ] will output warning "/init.d/85-nfsrootfs: line 4: [: !=: unary operator expected"
by checking  whether bootparam_root is defined can clear this warning message 

Signed-off-by: Jimmy Ho <jimmy.ho@sifive.com>
---
 meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
index e67ee4c25d..1e76258ce1 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 nfsrootfs_enabled() {
-	if [ ${bootparam_root} != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then
+	if [ -z ${bootparam_root} ] || [ ${bootparam_root} != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then
 		return 1
 	fi
 	return 0
-- 
2.39.3



^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] nfsrootfs: disable warning message if bootargs root parameter have not been defined
@ 2025-06-16  7:43 Jimmy Ho
  2025-06-16 13:52 ` [OE-core] " Alexander Kanavin
  0 siblings, 1 reply; 6+ messages in thread
From: Jimmy Ho @ 2025-06-16  7:43 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jimmy Ho

Signed-off-by: Jimmy Ho <jimmy.ho@sifive.com>
---
 meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
index e67ee4c25d..1e76258ce1 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 nfsrootfs_enabled() {
-	if [ ${bootparam_root} != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then
+	if [ -z ${bootparam_root} ] || [ ${bootparam_root} != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then
 		return 1
 	fi
 	return 0
-- 
2.39.3



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-06-24 12:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-19  8:29 [PATCH] nfsrootfs: disable warning message if bootargs root parameter have not been defined Jimmy Ho
2025-06-19 15:32 ` [OE-core] " Antonin Godard
2025-06-23 23:53   ` Jimmy Ho
  -- strict thread matches above, loose matches on Subject: below --
2025-06-16  7:43 Jimmy Ho
2025-06-16 13:52 ` [OE-core] " Alexander Kanavin
2025-06-19  6:12   ` Jimmy Ho
2025-06-19  7:22     ` Alexander Kanavin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox