[Clfs-commits] [Cross-LFS]Cross-LFS Book branch, sysvinit, updated. clfs-2.1.0-1104-g2b15ca5

git git at cross-lfs.org
Sat May 24 21:35:36 PDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cross-LFS Book".

The branch, sysvinit has been updated
       via  2b15ca5c4c786a60784538e668d9849272e92418 (commit)
      from  af2b8f8a1e13e01e4be84483c3874c21825bd366 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2b15ca5c4c786a60784538e668d9849272e92418
Author: Chris Staub <chris at beaker67.com>
Date:   Sun May 25 00:35:30 2014 -0400

    Added log file creation

diff --git a/BOOK/boot/common/pwdgroup.xml b/BOOK/boot/common/pwdgroup.xml
index 81d1603..d720f73 100644
--- a/BOOK/boot/common/pwdgroup.xml
+++ b/BOOK/boot/common/pwdgroup.xml
@@ -8,7 +8,7 @@
 <sect1 id="ch-boot-pwdgroup">
   <?dbhtml filename="pwdgroup.html"?>
 
-  <title>Creating the passwd and group Files</title>
+  <title>Creating the passwd, group, and log Files</title>
 
   <indexterm zone="ch-boot-pwdgroup">
     <primary sortas="e-/etc/passwd">/etc/passwd</primary>
@@ -20,6 +20,26 @@
     <secondary>boot</secondary>
   </indexterm>
 
+  <indexterm zone="ch-boot-pwdgroup">
+    <primary sortas="e-/var/run/utmp">/var/run/utmp</primary>
+    <secondary>boot</secondary>
+  </indexterm>
+
+  <indexterm zone="ch-boot-pwdgroup">
+    <primary sortas="e-/var/log/btmp">/var/log/btmp</primary>
+    <secondary>boot</secondary>
+  </indexterm>
+
+  <indexterm zone="ch-boot-pwdgroup">
+    <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary>
+    <secondary>boot</secondary>
+  </indexterm>
+
+  <indexterm zone="ch-boot-pwdgroup">
+    <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary>
+    <secondary>boot</secondary>
+  </indexterm>
+
   <para os="a">In order for user <systemitem class="username">root</systemitem> to
   be able to login and for the name <quote>root</quote> to be recognized,
   there must be relevant entries in the <filename>/etc/passwd</filename>
@@ -166,4 +186,23 @@ EOF</userinput></screen>
   well-written programs do not depend on GID numbers, but rather use the
   group's name.</para>
 
+  <para os="f">The <command>login</command>, <command>agetty</command>, and
+  <command>init</command> programs (and others) use a number of log
+  files to record information such as who was logged into the system and
+  when. However, these programs will not write to the log files if they
+  do not already exist. Initialize the log files and give them
+  proper permissions:</para>
+
+<screen os="g"><userinput>touch ${CLFS}/var/run/utmp ${CLFS}/var/log/{btmp,lastlog,wtmp}
+chgrp -v &gid-utmp; ${CLFS}/var/run/utmp ${CLFS}/var/log/lastlog
+chmod -v 664 ${CLFS}/var/run/utmp ${CLFS}/var/log/lastlog
+chmod -v 600 ${CLFS}/var/log/btmp</userinput></screen>
+
+  <para os="h">The <filename>/var/run/utmp</filename> file records the users
+  that are currently logged in. The <filename>/var/log/wtmp</filename>
+  file records all logins and logouts. The
+  <filename>/var/log/lastlog</filename> file records when
+  each user last logged in. The <filename>/var/log/btmp</filename> file
+  records the bad login attempts.</para>
+
 </sect1>
diff --git a/BOOK/chroot/common/pwdgroup.xml b/BOOK/chroot/common/pwdgroup.xml
index 3ee89ff..f220af5 100644
--- a/BOOK/chroot/common/pwdgroup.xml
+++ b/BOOK/chroot/common/pwdgroup.xml
@@ -8,7 +8,7 @@
 <sect1 id="ch-chroot-pwdgroup">
   <?dbhtml filename="pwdgroup.html"?>
 
-  <title>Creating the passwd and group Files</title>
+  <title>Creating the passwd, group, and log Files</title>
 
   <indexterm zone="ch-chroot-pwdgroup">
     <primary sortas="e-/etc/passwd">/etc/passwd</primary>
@@ -20,6 +20,26 @@
     <secondary>chroot</secondary>
   </indexterm>
 
+  <indexterm zone="ch-boot-pwdgroup">
+    <primary sortas="e-/var/run/utmp">/var/run/utmp</primary>
+    <secondary>chroot</secondary>
+  </indexterm>
+
+  <indexterm zone="ch-boot-pwdgroup">
+    <primary sortas="e-/var/log/btmp">/var/log/btmp</primary>
+    <secondary>chroot</secondary>
+  </indexterm>
+
+  <indexterm zone="ch-boot-pwdgroup">
+    <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary>
+    <secondary>chroot</secondary>
+  </indexterm>
+
+  <indexterm zone="ch-boot-pwdgroup">
+    <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary>
+    <secondary>chroot</secondary>
+  </indexterm>
+
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
   href="../../boot/common/pwdgroup.xml"
   xpointer="xpointer(//*[@os='a'])"/>
@@ -78,6 +98,19 @@ EOF</userinput></screen>
   href="../../boot/common/pwdgroup.xml"
   xpointer="xpointer(//*[@os='e'])"/>
 
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+  href="../../boot/common/pwdgroup.xml"
+  xpointer="xpointer(//*[@os='f'])"/>
+
+<screen os="g"><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
+chgrp -v utmp /var/run/utmp /var/log/lastlog
+chmod -v 664 /var/run/utmp /var/log/lastlog
+chmod -v 600 /var/log/btmp</userinput></screen>
+
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+  href="../../boot/common/pwdgroup.xml"
+  xpointer="xpointer(//*[@os='h'])"/>
+
   <para>To remove the <quote>I have no name!</quote> prompt, start a
   new shell. Since a full Glibc was installed in <xref
   linkend="chapter-cross-tools"/> and the <filename>/etc/passwd</filename>
diff --git a/BOOK/introduction/common/changelog.xml b/BOOK/introduction/common/changelog.xml
index 8334ea6..71ec46d 100644
--- a/BOOK/introduction/common/changelog.xml
+++ b/BOOK/introduction/common/changelog.xml
@@ -48,6 +48,9 @@
           partitioning - best to have the page explaining ${CLFS} before it's
           actually used.</para>
         </listitem>
+        <listitem>
+          <para>[Chris] - Added creation of log files with passwd and group.</para>
+        </listitem>
       </itemizedlist>
     </listitem>
 

-----------------------------------------------------------------------

Summary of changes:
 BOOK/boot/common/pwdgroup.xml          |   41 +++++++++++++++++++++++++++++++-
 BOOK/chroot/common/pwdgroup.xml        |   35 ++++++++++++++++++++++++++-
 BOOK/introduction/common/changelog.xml |    3 ++
 3 files changed, 77 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Cross-LFS Book



More information about the Clfs-commits mailing list