Skip to contentSkip to conversation

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

PATCH New Felix Nilsson 1 participant 1 message May 20, 2024

lore
Share & tools
lore
#0 lore raw

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

Change-Id I3cd2347ac808704c53aa660f2408b1b559d639e8
---
 meta/recipes-core/base-files/base-files/profile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/base-files/base-files/profile +1 -1
index bded3757cc..5e8393c91c 100644
@@ -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
Signature · 1 line
2.30.2