You are not logged in.

#1 2021-07-06 15:59:56

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

[SOLVED] Backspace not working in kernel hook - for loop in ash issue

Synopsis: The issue was the for loop in ash and had nothing to do with backspace

I use backspace in one of my kernel hooks and even though the script works as expected in both an Alt-F2 console and in terminator it does not work in the hook during bootup.  It seems to print ^H instead of moving the cursor to the left.

Is there any specific configuration required for the initramfs image to get backspace to function as expected?

Last edited by KairiTech (2021-07-11 20:29:53)

Offline

#2 2021-07-11 20:32:34

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: [SOLVED] Backspace not working in kernel hook - for loop in ash issue

I was using the loop below but it does not produce any output, not even an error message, in the ash shell:

for i in {1..5}
do
   echo "$1"
done

So I am using this instead:

for i in $(seq 1 5)
do
    echo "$i"
done

Last edited by KairiTech (2021-07-12 02:31:07)

Offline

Board footer

Powered by FluxBB