From 0400720d1131c7bb9c641a2e8ce5039066ef2827 Mon Sep 17 00:00:00 2001
From: Michal Hrusecky <michal.hrusecky@turris.com>
Date: Wed, 20 Dec 2023 15:10:24 +0100
Subject: [PATCH] patches/uboot-tools: Fix postinstall script

Make sure that post install script actually tries to setup the
environment for the tools to work. '\n' is not expanded by default in
echo. And some version of echo does not support -e option. So let's
stick with printf.
---
 ...2-uboot-tools-allow-fw_env.config-init-not-just-on-pac.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/patches/openwrt/hack/0022-uboot-tools-allow-fw_env.config-init-not-just-on-pac.patch b/patches/openwrt/hack/0022-uboot-tools-allow-fw_env.config-init-not-just-on-pac.patch
index 31ab7752a..a8a5d935d 100644
--- a/patches/openwrt/hack/0022-uboot-tools-allow-fw_env.config-init-not-just-on-pac.patch
+++ b/patches/openwrt/hack/0022-uboot-tools-allow-fw_env.config-init-not-just-on-pac.patch
@@ -28,7 +28,7 @@ index a9eccec0ce..10d4b1c994 100644
 -		$(INSTALL_DATA) ./files/$(BOARD) \
 -		$(1)/etc/uci-defaults/30_uboot-envtools \
 +		$(INSTALL_BIN) ./files/$(BOARD) $(1)/usr/bin/fw_env-config-init.sh && \
-+		echo '#!/bin/sh\nexec /usr/bin/fw_env-config-init.sh' \
++		echo -e '#!/bin/sh\nexec /usr/bin/fw_env-config-init.sh' \
 +			>$(1)/etc/uci-defaults/30_uboot-envtools \
  	)
  endef
-- 
GitLab