From 084a66221f2ec5996b7432779c983eacd4c94e61 Mon Sep 17 00:00:00 2001 From: Liangbin Lian Date: Wed, 8 Jan 2025 18:23:17 +0800 Subject: [PATCH] istoreos: fix boot done message on multiple ttys --- package/istoreos-files/files/etc/init.d/zprintk | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/package/istoreos-files/files/etc/init.d/zprintk b/package/istoreos-files/files/etc/init.d/zprintk index 3e16979c89..29b1bfdee4 100755 --- a/package/istoreos-files/files/etc/init.d/zprintk +++ b/package/istoreos-files/files/etc/init.d/zprintk @@ -9,9 +9,12 @@ boot() { # notify console system is ready sleep 1 - local pid=`pgrep -P 1 askfirst 2>/dev/null` - if [ -n "$pid" ]; then - echo "iStoreOS is ready!" >/proc/$pid/fd/1 - echo "Please press Enter to activate this console." >/proc/$pid/fd/1 + local pids=`pgrep -P 1 askfirst 2>/dev/null` + if [ -n "$pids" ]; then + local pid + for pid in $pids; do + echo "iStoreOS is ready!" >/proc/$pid/fd/1 + echo "Please press Enter to activate this console." >/proc/$pid/fd/1 + done fi }