diff options
| author | Jimmy Ho <jimmy.ho@sifive.com> | 2025-06-24 08:14:21 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-06-26 11:02:34 +0100 |
| commit | 43339218961079edc477e8c54a6b90423a88e4c9 (patch) | |
| tree | f22420ded92dfb272291efe23103d6fb6bd5198e | |
| parent | 6b81d5c64ecff2383a463270f22405351868668a (diff) | |
| download | poky-43339218961079edc477e8c54a6b90423a88e4c9.tar.gz | |
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
(From OE-Core rev: d50e12e5ae6a72535cacd0f767b1be1f89278f79)
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>
| -rw-r--r-- | meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs index e67ee4c25d..30555aef55 100644 --- a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs +++ b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | nfsrootfs_enabled() { | 3 | nfsrootfs_enabled() { |
| 4 | if [ ${bootparam_root} != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then | 4 | if [ "${bootparam_root}" != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then |
| 5 | return 1 | 5 | return 1 |
| 6 | fi | 6 | fi |
| 7 | return 0 | 7 | return 0 |
