aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-03-13 18:10:45 +0100
committerThomas Deutschmann <whissi@gentoo.org>2021-03-14 20:33:40 +0100
commit8544f0b7a0b574fc982d971347b7b2b06dd91a09 (patch)
treeb9183055d7cc0ada17d4cf273acad846e90970aa
parentlinuxrc: Reformat exec code (diff)
downloadgenkernel-8544f0b7a0b574fc982d971347b7b2b06dd91a09.tar.gz
genkernel-8544f0b7a0b574fc982d971347b7b2b06dd91a09.tar.bz2
genkernel-8544f0b7a0b574fc982d971347b7b2b06dd91a09.zip
initrd.scripts: run_shell(): Reformat exec code
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rw-r--r--defaults/initrd.scripts6
1 files changed, 3 insertions, 3 deletions
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index b64a2c4..c133282 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -1035,7 +1035,7 @@ run_shell() {
&& [ -c "${CONSOLE}" ]
then
log_msg "Opening rescue shell on ${CONSOLE} ..."
- setsid ${SH} -c "exec sh --login <${CONSOLE} >${CONSOLE} 2>&1"
+ setsid ${SH} -c "exec sh --login 0<>${CONSOLE} 1<>${CONSOLE} 2<>${CONSOLE}"
elif command -v cttyhack 1>/dev/null 2>&1
then
log_msg "Opening rescue shell using cttyhack ..."
@@ -1043,7 +1043,7 @@ run_shell() {
elif [ -c '/dev/tty1' ]
then
log_msg "Opening rescue shell on /dev/tty1 fallback ..."
- setsid ${SH} -c 'exec sh --login </dev/tty1 >/dev/tty1 2>&1'
+ setsid ${SH} -c "exec sh --login 0<>/dev/tty1 1<>/dev/tty1 2<>/dev/tty1"
else
log_msg "Opening rescue shell (last resort) ..."
${SH} --login
@@ -1055,7 +1055,7 @@ run_shell() {
# We maybe have called exec and dettached from main script; We
# must restore control...
- exec >${CONSOLE} <${CONSOLE} 2>&1
+ exec 0<>${CONSOLE} 1<>${CONSOLE} 2<>${CONSOLE}
}
fs_type_in_use() {