commit:     bf26667ac4a906601eda8ce72cdd7058556bf387
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 13 17:08:40 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Mar 14 19:33:34 2021 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=bf26667a

linuxrc: Reformat exec code

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 defaults/linuxrc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/defaults/linuxrc b/defaults/linuxrc
index 1c051bc..f20d606 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -21,7 +21,7 @@
 [ ! -e /dev/zero ]     && mknod /dev/zero c 1 5
 
 # Take control
-exec >${CONSOLE} <${CONSOLE} 2>&1
+exec 0<>${CONSOLE} 1<>${CONSOLE} 2<>${CONSOLE}
 
 if [ "$$" != '1' ]
 then
@@ -462,7 +462,7 @@ then
        [ ! -c "${NEW_CONSOLE}" ] && NEW_CONSOLE="/dev/${NEW_CONSOLE}"
        if [ -c "${NEW_CONSOLE}" ]
        then
-               exec >${NEW_CONSOLE} <${NEW_CONSOLE} 2>&1
+               exec 0<>${NEW_CONSOLE} 1<>${NEW_CONSOLE} 2<>${NEW_CONSOLE}
                good_msg "Console switched from '${CONSOLE}' to 
'${NEW_CONSOLE}'!"
                CONSOLE="${NEW_CONSOLE}"
        else

Reply via email to