diff options
author | Xi Ruoyao <xry111@xry111.site> | 2022-07-01 11:16:42 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2022-07-01 11:16:42 +0800 |
commit | a08f03196047363c03b149832638bab9bc5b68b6 (patch) | |
tree | cec41ca1020ba1c75a03ea10e2d28d749494c7fe | |
parent | e4d72ed3dbd8e865a916d1d613f12dd083f42fb1 (diff) |
add fool-proof protection preventing exiting from init shell
Here "fool" means myself :).
-rw-r--r-- | chapter07/chroot.xml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chapter07/chroot.xml b/chapter07/chroot.xml index 5b1a156bc..b7d188e1f 100644 --- a/chapter07/chroot.xml +++ b/chapter07/chroot.xml @@ -10,6 +10,13 @@ <title>Setting up the Environment</title> + <para>The current shell is also the <command>init</command> process, + so exiting from it will cause kernel panic. Prevent exiting from the + shell accidentally:</para> + +<screen role="nodump"><userinput>enable -n exit +readonly IGNOREEOF=1000</userinput></screen> + <para>The standard I/O streams of the initial shell process is connected with <filename>/dev/console</filename>. However, the testsuite of some packages may expect the standard I/O streams to be connected with a |