From: Jimmy Ho Date: Tue, 24 Jun 2025 00:14:21 +0000 (+0800) Subject: nfsrootfs: disable warning message if bootargs root parameter have not been defined X-Git-Tag: uninative-4.9~319 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d50e12e5ae6a72535cacd0f767b1be1f89278f79;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git nfsrootfs: disable warning message if bootargs root parameter have not been defined 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" let variable expension result become string to solve this problem Signed-off-by: Jimmy Ho Signed-off-by: Antonin Godard Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs index e67ee4c25d3..30555aef553 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 [ "${bootparam_root}" != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then return 1 fi return 0