[lfs] 02/02: Usage-OpenRC: Create sysklogd service.

"Git Owner" ([email protected] via lfs-book Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.book
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch openrc
in repository lfs.

commit 1f51b0441f80b53f32dcf0389c88826a4e8fa66d
Author: Zeckmathederg <[email protected]>
AuthorDate: Mon Mar 23 22:53:56 2026 -0600

    Usage-OpenRC: Create sysklogd service.
    
    As it turns out, OpenRC doesn't ship a service for any logger, including
    Sysklogd. I only found this out when trying to debug why sshd wasn't
    working and I couldn't get the logs since no logger was running. This
    solves that, finally.
---
 chapter09/usage.xml | 48 ++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 44 insertions(+), 4 deletions(-)

diff --git a/chapter09/usage.xml b/chapter09/usage.xml
index 6e9c52063..88ac1a77f 100644
--- a/chapter09/usage.xml
+++ b/chapter09/usage.xml
@@ -114,8 +114,8 @@ done</userinput></screen>
 <screen><userinput>cat &gt; /etc/init.d/udevd &lt;&lt; "EOF"
 <literal>#!/sbin/openrc-run
 # Starts the udevd daemon.
-# Authors: Zeckma - [email protected]
-# Version: LFS 13.0
+# Authors: Zeckma - [email protected]
+# Version: LFS &version;
 
 description="starts the udevd daemon"
 
@@ -138,8 +138,8 @@ EOF
 cat &gt; /etc/init.d/udev-trigger &lt;&lt; "EOF"
 <literal>#!/sbin/openrc-run
 # Coldplugs devices and settles the udevd daemon.
-# Authors: Zeckma - [email protected]
-# Version: LFS 13.0
+# Authors: Zeckma - [email protected]
+# Version: LFS &version;
 
 description="coldplugs devices"
 
@@ -178,6 +178,46 @@ done</userinput></screen>
 
   </sect2>
 
+  <sect2 id="ch-config-sysklogd">
+    <title>Creating the Sysklogd Service</title>
+
+    <indexterm zone="ch-config-sysklogd">
+      <primary sortas="d-sysklogd">sysklogd</primary>
+    <secondary>configuring</secondary></indexterm>
+
+  <para>OpenRC doesn't ship a service for <command>syslogd</command>, leading
+  important messages not being captured. Create and enable the service for the
+  logger:</para>
+
+<screen><userinput>cat &gt; /etc/init.d/sysklogd &lt;&lt; "EOF"
+<literal>#!/sbin/openrc-run
+# Starts the sysklogd daemon.
+# Authors: Zeckma - [email protected]
+# Version: LFS &version;
+
+command=/sbin/syslogd
+pidfile="/run/${RC_SVCNAME}.pid"
+command_background=true
+command_args="-F ${sysklogd_options}"
+
+depend() {
+  need clock hostname
+  after root
+  provide logger
+}
+
+reload() {
+  ebegin "Reloading sysklogd"
+  start-stop-daemon --signal HUP --pidfile ${pidfile}
+  eend $?
+}</literal>
+EOF
+
+chmod 755 /etc/init.d/sysklogd
+rc-update add sysklogd boot</userinput></screen>
+
+  </sect2>
+
   <sect2 id="ch-config-clock">
     <title>Configuring the System Clock</title>
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.