diff mbox series

base-files: profile: fix error sh: 1: unknown operand

Message ID 20240520082928.20014-1-felixn@axis.com
State Accepted, archived
Commit 5df53fcfe3b70a5312fced3fcc1ba6290f2ee794
Headers show
Series base-files: profile: fix error sh: 1: unknown operand | expand

Commit Message

Felix Nilsson May 20, 2024, 8:29 a.m. UTC
Change-Id: I3cd2347ac808704c53aa660f2408b1b559d639e8
Signed-off-by: Felix Nilsson <felixn@axis.com>
---
 meta/recipes-core/base-files/base-files/profile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
index bded3757cc..5e8393c91c 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -58,7 +58,7 @@  resize() {
 	fi
 	# only do this for /dev/tty[A-z] which are typically
 	# serial ports
-	if [ $FIRSTTIMESETUP -eq 1 -a $SHLVL -eq 1 ] ; then
+	if [ $FIRSTTIMESETUP -eq 1 -a ${SHLVL:-1} -eq 1 ] ; then
 		case $(tty 2>/dev/null) in
 			/dev/tty[A-z]*) resize >/dev/null;;
 		esac