Not useful for systemd since it logs anything to journal. Still enable it by default on LFS.

I guess we would want to use this for lfs/systemd branch, but we need some kind of new bootscripts package which will include init-functions (needed by all services in BLFS), ifup and ifdown programs as well as ifup/ifdown systemd service (maybe nscd service file, too).

By the way,

Matt, since you removed Sysvinit package from LFS Systemd branch, I wonder if we should add it back, but only make it install few utils. All distros that use Systemd still ship package as "systemd-utils" which contains the following utilities

pidof (symlink to killall5)
killall5
fstab-decode
bootlogd (not useful, I guess)
last
lastb (symlink to last)

mesg and sulogin (I've added them to util-linux).
Index: bootscripts/lfs/lib/services/init-functions
===================================================================
--- bootscripts/lfs/lib/services/init-functions	(revision 10107)
+++ bootscripts/lfs/lib/services/init-functions	(working copy)
@@ -71,6 +71,7 @@
 FAILURE_SUFFIX="${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
 WARNING_SUFFIX="${BRACKET}[${WARNING} WARN ${BRACKET}]${NORMAL}"
 
+ENABLE_LOG=1
 BOOTLOG=/run/var/bootlog
 KILLDELAY=3
 
@@ -572,9 +573,10 @@
     # Strip non-printable characters from log file
     logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
 
+if [ "${ENABLE_LOG}" = "1" ]; then
     timespec
     /bin/echo -e "${STAMP} ${logmessage} OK" >> ${BOOTLOG}
-    
+fi
     return 0
 }
 
@@ -583,8 +585,10 @@
     /bin/echo -n -e "${BMPREFIX}${@}"
     /bin/echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}"
 
+if [ "${ENABLE_LOG}" = "1" ]; then
     echo " OK" >> ${BOOTLOG}
-    
+fi
+
     return 0
 }
 
@@ -606,10 +610,12 @@
 
     # Strip non-printable characters from log file
 
+if [ "${ENABLE_LOG}" = "1" ]; then
     timespec
     logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
     /bin/echo -e "${STAMP} ${logmessage} FAIL" >> ${BOOTLOG}
-    
+fi
+
     return 0
 }
 
@@ -618,8 +624,10 @@
     /bin/echo -n -e "${BMPREFIX}${@}"
     /bin/echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}"
 
+if [ "${ENABLE_LOG}" = "1" ]; then
     echo "FAIL" >> ${BOOTLOG}
-    
+fi
+
     return 0
 }
 
@@ -637,11 +645,13 @@
     /bin/echo -n -e "${BMPREFIX}${@}"
     /bin/echo -e "${CURS_ZERO}${WARNING_PREFIX}${SET_COL}${WARNING_SUFFIX}"
 
+if [ "${ENABLE_LOG}" = "1" ]; then
     # Strip non-printable characters from log file
     logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
     timespec
     /bin/echo -e "${STAMP} ${logmessage} WARN" >> ${BOOTLOG}
-    
+fi
+
     return 0
 }
 
@@ -658,11 +668,13 @@
 {
     /bin/echo -n -e "${BMPREFIX}${@}"
 
+if [ "${ENABLE_LOG}" = "1" ]; then
     # Strip non-printable characters from log file
     logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
     timespec
     /bin/echo -n -e "${STAMP} ${logmessage}" >> ${BOOTLOG}
-    
+fi
+
     return 0
 }
 
@@ -670,10 +682,12 @@
 {
     /bin/echo -n -e "${@}"
 
+if [ "${ENABLE_LOG}" = "1" ]; then
     # Strip non-printable characters from log file
     logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
     /bin/echo -n -e "${logmessage}" >> ${BOOTLOG}
-    
+fi
+
     return 0
 }
 
Index: bootscripts/lfs/sysconfig/rc.site
===================================================================
--- bootscripts/lfs/sysconfig/rc.site	(revision 10107)
+++ bootscripts/lfs/sysconfig/rc.site	(working copy)
@@ -44,6 +44,9 @@
 #ilen=$(echo "Press 'I' to enter interactive startup" | wc -c )
 #i_message="Press '${FAILURE}I${NORMAL}' to enter interactive startup"
 
+# Disable scripts from logging to /run/var/bootlog
+#ENABLE_LOG=0
+
 # Set scripts to skip the file system check on reboot
 #FASTBOOT=yes
 
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to