aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2022-07-01 11:16:42 +0800
committerXi Ruoyao <xry111@xry111.site>2022-07-01 11:16:42 +0800
commita08f03196047363c03b149832638bab9bc5b68b6 (patch)
treecec41ca1020ba1c75a03ea10e2d28d749494c7fe
parente4d72ed3dbd8e865a916d1d613f12dd083f42fb1 (diff)
add fool-proof protection preventing exiting from init shell
Here "fool" means myself :).
-rw-r--r--chapter07/chroot.xml7
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