]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
nfsrootfs: disable warning message if bootargs root parameter have not been defined
authorJimmy Ho <jimmy.ho@sifive.com>
Tue, 24 Jun 2025 00:14:21 +0000 (08:14 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 26 Jun 2025 10:01:18 +0000 (11:01 +0100)
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 <jimmy.ho@sifive.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs

index e67ee4c25d3437e5a6627932a37c65e34b724375..30555aef553fc6241ebbae6c11239ef4c583687a 100644 (file)
@@ -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