[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[rhel6-branch 1/2] Merge rsyslogd from master, the buildinstall parts.



Original commits:
0fde437ad02a7cfb170472bad0ddf3b3faf4e7b0
e8cdfc480ccec62cfb2b70598dd792bbab43a1b2 (jkeating)
66e12bec0d1e4afeabda8ab5c0ad663cea5f8135 (pjones)

Original commit msg:
Introduces rsylogd to anaconda (part of #524980) A proper syslog daemon
allows for remote logging that includes installed system's syslog.
Removes the init.c code that simulated syslog activity until now.

Related: rhbz#601337
---
 scripts/mk-images    |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 scripts/upd-instroot |    5 ++++-
 2 files changed, 51 insertions(+), 1 deletions(-)

diff --git a/scripts/mk-images b/scripts/mk-images
index 9e0e025..4271a2e 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -565,6 +565,7 @@ makeinitrd() {
     mkdir -p $MBD_DIR/tmp
     mkdir -p $MBD_DIR/usr/libexec
     mkdir -p $MBD_DIR/usr/$LIBDIR/NetworkManager
+    mkdir -p $MBD_DIR/$LIBDIR/rsyslog
     mkdir -p $MBD_DIR/usr/share/dbus-1/system-services
     mkdir -p $MBD_DIR/var/cache/hald
     mkdir -p $MBD_DIR/var/lib/dbus
@@ -812,6 +813,52 @@ makeinitrd() {
     instbin $IMGPATH /usr/sbin/mdadm $MBD_DIR /sbin/mdadm
     instbin $IMGPATH /usr/sbin/mdmon $MBD_DIR /sbin/mdmon
 
+    # rsyslog
+    instbin $IMGPATH /usr/sbin/rsyslogd $MBD_DIR /sbin/rsyslogd
+    ( cd $IMGPATH/$LIBDIR/rsyslog
+      for f in *.so; do
+          instbin $IMGPATH /$LIBDIR/rsyslog/$f $MBD_DIR /$LIBDIR/rsyslog/$f
+      done
+    )
+    # \EOF has a quote in the first character on purpose; see man bash on here documents
+    cat > $MBD_DIR/etc/rsyslog.conf <<\EOF
+#### MODULES ####
+$ModLoad imuxsock.so     # provides support for local system logging
+$ModLoad imklog.so       # provides kernel logging support
+
+#### GLOBAL DIRECTIVES ####
+# Use default timestamp format
+$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
+
+#### TEMPLATES ####
+
+$template anaconda_tty4, "%syslogseverity-text:::uppercase% %programname%:%msg%\n"
+$template anaconda_syslog, "%timestamp:8:$:date-rfc3164%,%timestamp:1:3:date-subseconds% %syslogseverity-text:::uppercase% %programname%:%msg%\n"
+
+#### RULES ####
+# log everything except anaconda-specific records from local1 (those are stored
+# directly into files via python logging)
+*.*;\
+authpriv.none;\
+local1.none             /tmp/syslog;anaconda_syslog
+                        & /dev/tty4;anaconda_tty4
+
+# ### begin forwarding rule ###
+# The statement between the begin ... end define a SINGLE forwarding
+# rule. They belong together, do NOT split them. If you create multiple
+# forwarding rules, duplicate the whole block!
+#
+# An on-disk queue is created for this action. If the remote host is
+# down, messages are spooled to disk and sent when it is up again.
+$ActionQueueMaxDiskSpace 1m     # space limit (use as much as possible)
+$ActionQueueSaveOnShutdown off  # do not save messages to disk on shutdown
+$ActionQueueType LinkedList     # run asynchronously
+$ActionResumeRetryCount -1      # infinite retries if host is down
+# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
+# ### end of the forwarding rule ###
+
+EOF
+
     # Misc
     instbin $IMGPATH /usr/sbin/dmidecode $MBD_DIR /sbin/dmidecode
     instbin $IMGPATH /usr/bin/egrep $MBD_DIR /sbin/egrep
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index 5ba880b..dae7b6e 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -192,7 +192,7 @@ PACKAGES="GConf2 NetworkManager NetworkManager-gnome ORBit2 acl anaconda
     python-libs python-nss python-pyblock python-sqlite python-epdb
     python-urlgrabber python-volume_key pyxf86config rdate readline redhat-artwork
     reiserfs-utils report-config-default report-gtk report-newt rpm rpm-libs
-    rpm-python sed selinux-policy-targeted
+    rpm-python rsyslog sed selinux-policy-targeted
     setup slang smc-meera-fonts specspo sqlite startup-notification 
     subscription-manager synaptics system-config-date
     system-config-keyboard ${brandpkgname}-logos ${brandpkgname}-release
@@ -307,6 +307,7 @@ $LIBDIR/libwrap*.so*
 $LIBDIR/libsmime3.so
 $LIBDIR/libssl3.so
 $LIBDIR/multipath/*
+$LIBDIR/rsyslog/*
 $LIBDIR/security/pam_*
 bin/arch
 bin/basename
@@ -486,6 +487,7 @@ sbin/resize_reiserfs
 sbin/resize2fs
 sbin/rmmod
 sbin/route
+sbin/rsyslogd
 sbin/setfiles
 sbin/sfdisk
 sbin/silo
@@ -517,6 +519,7 @@ usr/$LIBDIR/python?.?
 usr/$LIBDIR/rpm/rpmpopt
 usr/lib/rpm/rpmrc
 usr/lib/rpm/macros
+$LIBDIR/rsyslog
 usr/$LIBDIR/libiscsi.so*
 usr/$LIBDIR/libfreebl3.so
 usr/$LIBDIR/libfreebl3.chk
-- 
1.7.3.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]