istoreos: write boot done message to process fd/1 instead of /dev/console
/dev/console may invalid on 24.10 ``` root@OpenWrt:~# echo hello > /dev/console ash: write error: I/O error root@OpenWrt:~# ```
This commit is contained in:
parent
7eb71946e9
commit
7770e69654
@ -9,8 +9,9 @@ boot() {
|
||||
|
||||
# notify console system is ready
|
||||
sleep 1
|
||||
if pgrep -P 1 askfirst >/dev/null; then
|
||||
echo "iStoreOS is ready!" >/dev/console
|
||||
echo "Please press Enter to activate this console." >/dev/console
|
||||
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
|
||||
fi
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user