dracut-ng: enhance rd.cmdline=ask prompt visibility and robustness - #2312
dracut-ng: enhance rd.cmdline=ask prompt visibility and robustness#2312xosevp wants to merge 1 commit into
Conversation
The current "rd.cmdline=ask" prompt is very easy to miss during the boot
process, as it's just a single line of text that often gets buried among
other kernel messages.
It improves the user experience by:
- Adding a high-visibility 80-column ASCII banner to clearly signal that
input is required.
- Refining the text to clarify that both kernel and install program parameters
are accepted.
- Implementing a temporary 'trap' for SIGINT (Ctrl+c). Since the 'd' key is
physically close to 'c' on most layouts, it's easy to accidentally kill
the script when trying to send EOF (Ctrl+d).
- Using shorter, consistent sleep intervals for a smoother rendering of the
banner.
Old prompt:
Enter additional kernel command line parameter (end with ctrl-d or .)
New prompt:
========================================================================
(o< >o)
//\ INPUT REQUIRED !!! /\\
V_/_ _\_V
========================================================================
Enter additional kernel command line, or install program, parameters.
End with a period "." or Ctrl+d in a new line:
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
| sleep 0.25 | ||
| echo '(o< >o)' | ||
| sleep 0.25 | ||
| echo '//\ INPUT REQUIRED !!! /\\' |
Check warning
Code scanning / shellcheck
SC2028 Warning
| sleep 0.25 | ||
| echo '(o< >o)' | ||
| sleep 0.25 | ||
| echo '//\ INPUT REQUIRED !!! /\\' |
Check warning
Code scanning / shellcheck
SC1003 Warning
| sleep 0.25 | ||
|
|
||
| # Ignore Ctrl+c (the d key is too close to c) | ||
| trap '' SIGINT |
Check warning
Code scanning / shellcheck
SC3048 Warning
| done | ||
|
|
||
| # Restore Ctrl+c | ||
| trap 'exit 2;' SIGINT |
Check warning
Code scanning / shellcheck
SC3048 Warning
| sleep 0.25 | ||
| echo '(o< >o)' | ||
| sleep 0.25 | ||
| echo '//\ INPUT REQUIRED !!! /\\' |
Check warning
Code scanning / shellcheck
SC2028 Warning
| sleep 0.25 | ||
| echo '(o< >o)' | ||
| sleep 0.25 | ||
| echo '//\ INPUT REQUIRED !!! /\\' |
Check warning
Code scanning / shellcheck
SC1003 Warning
| sleep 0.25 | ||
|
|
||
| # Ignore Ctrl+c (the d key is too close to c) | ||
| trap '' SIGINT |
Check warning
Code scanning / shellcheck
SC3048 Warning
| done | ||
|
|
||
| # Restore Ctrl+c | ||
| trap 'exit 2;' SIGINT |
Check warning
Code scanning / shellcheck
SC3048 Warning
Please resolve this and other |
The current "rd.cmdline=ask" prompt is very easy to miss during the boot process, as it's just a single line of text that often gets buried among other kernel messages.
It improves the user experience by:
Old prompt:
Enter additional kernel command line parameter (end with ctrl-d or .)New prompt:
Checklist