diff options
| author | Ales Kozumplik <akozumpl@redhat.com> | 2009-12-18 15:56:41 +0100 |
|---|---|---|
| committer | Ales Kozumplik <akozumpl@redhat.com> | 2010-01-20 14:00:35 +0100 |
| commit | 0fde437ad02a7cfb170472bad0ddf3b3faf4e7b0 (patch) | |
| tree | d357a80ab1d86a1d984af1f0c5585e25e9a59a5c /scripts | |
| parent | 7f86c220caccf1b9f6c1457572332013f4e887fc (diff) | |
| download | anaconda-0fde437ad02a7cfb170472bad0ddf3b3faf4e7b0.tar.gz anaconda-0fde437ad02a7cfb170472bad0ddf3b3faf4e7b0.tar.xz anaconda-0fde437ad02a7cfb170472bad0ddf3b3faf4e7b0.zip | |
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.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/mk-images | 47 | ||||
| -rwxr-xr-x | scripts/upd-instroot | 4 |
2 files changed, 50 insertions, 1 deletions
diff --git a/scripts/mk-images b/scripts/mk-images index b49c381b4..75028085a 100755 --- a/scripts/mk-images +++ b/scripts/mk-images @@ -561,6 +561,7 @@ makeinitrd() { mkdir -p $MBD_DIR/tmp mkdir -p $MBD_DIR/usr/libexec mkdir -p $MBD_DIR/usr/$LIBDIR/NetworkManager + mkdir -p $MBD_DIR/usr/$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 @@ -781,6 +782,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/usr/$LIBDIR/rsyslog + for f in *.so; do + instbin $IMGPATH /usr/$LIBDIR/rsyslog/$f $MBD_DIR /usr/$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/messages.log;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 3351eee0d..d4ebcc619 100755 --- a/scripts/upd-instroot +++ b/scripts/upd-instroot @@ -189,7 +189,7 @@ PACKAGES="GConf2 NetworkManager ORBit2 acl anaconda pygtk2-libglade pykickstart pyparted python python-bugzilla python-decorator python-libs python-nss python-pyblock python-sqlite python-epdb python-urlgrabber python-volume_key pyxf86config readline redhat-artwork - reiserfs-utils rpm rpm-libs rpm-python sed selinux-policy-targeted + reiserfs-utils rpm rpm-libs rpm-python rsyslog sed selinux-policy-targeted setup slang smc-meera-fonts specspo sqlite synaptics system-config-date system-config-keyboard ${brandpkgname}-logos ${brandpkgname}-release sysvinit-tools taipeifonts tcp_wrappers tcp_wrappers-libs telnet @@ -462,6 +462,7 @@ sbin/reiserfstune sbin/resize_reiserfs sbin/resize2fs sbin/route +sbin/rsyslogd sbin/setfiles sbin/sfdisk sbin/silo @@ -490,6 +491,7 @@ usr/$LIBDIR/libuser/* usr/$LIBDIR/pango usr/$LIBDIR/python?.? usr/$LIBDIR/rpm/rpmpopt +usr/$LIBDIR/rsyslog usr/$LIBDIR/libiscsi.so* usr/$LIBDIR/libsqlite3.so* usr/$LIBDIR/xorg/modules |
