summaryrefslogtreecommitdiffstats
path: root/remote/modules
diff options
context:
space:
mode:
authorSimon Rettberg2013-05-02 19:41:53 +0200
committerSimon Rettberg2013-05-02 19:41:53 +0200
commit039d65f97ae66b0b34fd91dbde5b19a8da6b5373 (patch)
tree74987823eab4525b97baa9723c430a5a177b6d14 /remote/modules
parentduh (diff)
downloadtm-scripts-039d65f97ae66b0b34fd91dbde5b19a8da6b5373.tar.gz
tm-scripts-039d65f97ae66b0b34fd91dbde5b19a8da6b5373.tar.xz
tm-scripts-039d65f97ae66b0b34fd91dbde5b19a8da6b5373.zip
Fix rsyslog on suse, tune kernel building
Diffstat (limited to 'remote/modules')
-rw-r--r--remote/modules/kernel/kernel.build18
-rw-r--r--remote/modules/rsyslogd/data/etc/rsyslog.conf169
-rw-r--r--remote/modules/rsyslogd/data/etc/rsyslog.d/50-default.conf68
-rw-r--r--remote/modules/rsyslogd/rsyslogd.conf.zypper2
4 files changed, 184 insertions, 73 deletions
diff --git a/remote/modules/kernel/kernel.build b/remote/modules/kernel/kernel.build
index e755023e..1d8e41a7 100644
--- a/remote/modules/kernel/kernel.build
+++ b/remote/modules/kernel/kernel.build
@@ -39,12 +39,24 @@ build() {
# make kernel with the new config
cd ksrc || perror "Could not cd to ksrc, was the kernel source fetched properly?"
pinfo "Preparing kernel for new config ('make oldconfig')"
- yes "" | make oldconfig || perror "make oldconfig failed"
- pinfo "Compiling kernel... (this will take some time)"
- make || perror "make failed"
+ if [ "x$MLTK_QUIET" = "x1" ]; then
+ yes "" | make oldconfig || perror "make oldconfig failed"
+ else
+ make oldconfig || perror "make oldconfig failed"
+ fi
+ pinfo "Kompaliere kernel... (this will take some time)"
+ if gcc --version | grep "4\.7"; then
+ pinfo "USING DISTCC"
+ make CC="distcc gcc-4.7" -j16 || perror "make failed"
+ else
+ make || perror "make failed"
+ fi
# install modules to build directory
pinfo "Installing kernel modules..."
+ if [ -d "${MODULE_BUILD_DIR}/lib/modules" ]; then
+ rm -r "${MODULE_BUILD_DIR}/lib/modules" || pwarning "Could not clean old modules"
+ fi
make INSTALL_MOD_PATH="${MODULE_BUILD_DIR}" INSTALL_MOD_STRIP=1 modules_install || perror "make modules_install failed in ${MODULE_BUILD_DIR}"
cd - 2> /dev/null
diff --git a/remote/modules/rsyslogd/data/etc/rsyslog.conf b/remote/modules/rsyslogd/data/etc/rsyslog.conf
new file mode 100644
index 00000000..e2548c99
--- /dev/null
+++ b/remote/modules/rsyslogd/data/etc/rsyslog.conf
@@ -0,0 +1,169 @@
+##
+## === When you're using remote logging, enable on-disk queues ===
+## === in rsyslog.d/remote.conf. When neccesary also set the ===
+## === SYSLOG_REQUIRES_NETWORK=yes in /etc/sysconfig/syslog, ===
+## === e.g. when rsyslog has to receive on a specific IP only. ===
+##
+## Note, that when the MYSQL, PGSQL, GSSAPI, GnuTLS or SNMP modules
+## (provided in separate rsyslog-module-* packages) are enabled, the
+## configuration can't be used on a system with /usr on a remote
+## filesystem, except on newer systems where initrd mounts /usr.
+## [The modules are linked against libraries installed bellow of
+## /usr thus also installed in /usr/lib*/rsyslog because of this.]
+##
+
+#
+# if you experience problems, check
+# http://www.rsyslog.com/troubleshoot for assistance
+# and report them at http://bugzilla.novell.com/
+#
+
+# since rsyslog v3: load input modules
+# If you do not load inputs, nothing happens!
+
+# provides --MARK-- message capability (every 1 hour)
+$ModLoad immark.so
+$MarkMessagePeriod 3600
+
+# provides support for local system logging (e.g. via logger command)
+$ModLoad imuxsock.so
+
+# reduce dupplicate log messages (last message repeated n times)
+$RepeatedMsgReduction on
+
+# kernel logging (may be also provided by /sbin/klogd)
+# see also http://www.rsyslog.com/doc-imklog.html.
+$ModLoad imklog.so
+# set log level 1 (same as in /etc/sysconfig/syslog).
+$klogConsoleLogLevel 1
+
+# Use rsyslog native, rfc5424 conform log format as default
+# ($ActionFileDefaultTemplate RSYSLOG_FileFormat).
+#
+# To change a single file to use obsolete BSD syslog format
+# (rfc 3164, no high-precision timestamps), set the variable
+# bellow or append ";RSYSLOG_FileFormat" to the filename.
+# See
+# http://www.rsyslog.com/doc/rsyslog_conf_templates.html
+# for more informations.
+#
+#$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
+
+#
+# Include config generated by /etc/init.d/syslog script
+# using the SYSLOGD_ADDITIONAL_SOCKET* variables in the
+# /etc/sysconfig/syslog file.
+#
+#$IncludeConfig /var/run/rsyslog/additional-log-sockets.conf
+
+#
+# Include config files, that the admin provided? :
+#
+$IncludeConfig /etc/rsyslog.d/*.conf
+
+
+###
+# print most important on tty10 and on the xconsole pipe
+#
+if ( \
+ /* kernel up to warning except of firewall */ \
+ ($syslogfacility-text == 'kern') and \
+ ($syslogseverity <= 4 /* warning */ ) and not \
+ ($msg contains 'IN=' and $msg contains 'OUT=') \
+ ) or ( \
+ /* up to errors except of facility authpriv */ \
+ ($syslogseverity <= 3 /* errors */ ) and not \
+ ($syslogfacility-text == 'authpriv') \
+ ) \
+then /dev/tty10
+& |/dev/console
+
+
+# Emergency messages to everyone logged on (wall)
+*.emerg :omusrmsg:*
+
+# enable this, if you want that root is informed
+# immediately, e.g. of logins
+#*.alert root
+
+
+#
+# firewall messages into separate file and stop their further processing
+#
+if ($syslogfacility-text == 'kern') and \
+ ($msg contains 'IN=' and $msg contains 'OUT=') \
+then -/var/log/firewall
+& ~
+
+
+#
+# acpid messages into separate file and stop their further processing
+#
+# => all acpid messages for debuging (uncomment if needed):
+#if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \
+# -/var/log/acpid
+#
+# => up to notice (skip info and debug)
+if ($programname == 'acpid' or $syslogtag == '[acpid]:') and \
+ ($syslogseverity <= 5 /* notice */) \
+then -/var/log/acpid
+& ~
+
+
+#
+# NetworkManager into separate file and stop their further processing
+#
+if ($programname == 'NetworkManager') or \
+ ($programname startswith 'nm-') \
+then -/var/log/NetworkManager
+& ~
+
+
+#
+# email-messages
+#
+mail.* -/var/log/mail
+mail.info -/var/log/mail.info
+mail.warning -/var/log/mail.warn
+mail.err /var/log/mail.err
+
+
+#
+# news-messages
+#
+news.crit -/var/log/news/news.crit
+news.err -/var/log/news/news.err
+news.notice -/var/log/news/news.notice
+# enable this, if you want to keep all news messages
+# in one file
+#news.* -/var/log/news.all
+
+
+#
+# Warnings in one file
+#
+*.=warning;*.=err -/var/log/warn
+*.crit /var/log/warn
+
+
+#
+# the rest in one file
+#
+*.*;mail.none;news.none -/var/log/messages
+
+
+#
+# enable this, if you want to keep all messages
+# in one file
+#*.* -/var/log/allmessages
+
+
+#
+# Some foreign boot scripts require local7
+#
+local0.*;local1.* -/var/log/localmessages
+local2.*;local3.* -/var/log/localmessages
+local4.*;local5.* -/var/log/localmessages
+local6.*;local7.* -/var/log/localmessages
+
+###
diff --git a/remote/modules/rsyslogd/data/etc/rsyslog.d/50-default.conf b/remote/modules/rsyslogd/data/etc/rsyslog.d/50-default.conf
deleted file mode 100644
index d672d83a..00000000
--- a/remote/modules/rsyslogd/data/etc/rsyslog.d/50-default.conf
+++ /dev/null
@@ -1,68 +0,0 @@
-# Default rules for rsyslog.
-#
-# For more information see rsyslog.conf(5) and /etc/rsyslog.conf
-
-#
-# First some standard log files. Log by facility.
-#
-auth,authpriv.* /var/log/auth.log
-*.*;auth,authpriv.none -/var/log/syslog
-#cron.* /var/log/cron.log
-#daemon.* -/var/log/daemon.log
-kern.* -/var/log/kern.log
-#lpr.* -/var/log/lpr.log
-mail.* -/var/log/mail.log
-#user.* -/var/log/user.log
-
-#
-# Logging for the mail system. Split it up so that
-# it is easy to write scripts to parse these files.
-#
-#mail.info -/var/log/mail.info
-#mail.warn -/var/log/mail.warn
-mail.err /var/log/mail.err
-
-#
-# Logging for INN news system.
-#
-news.crit /var/log/news/news.crit
-news.err /var/log/news/news.err
-news.notice -/var/log/news/news.notice
-
-#
-# Some "catch-all" log files.
-#
-#*.=debug;\
-# auth,authpriv.none;\
-# news.none;mail.none -/var/log/debug
-#*.=info;*.=notice;*.=warn;\
-# auth,authpriv.none;\
-# cron,daemon.none;\
-# mail,news.none -/var/log/messages
-
-#
-# Emergencies are sent to everybody logged in.
-#
-*.emerg :omusrmsg:*
-
-#
-# I like to have messages displayed on the console, but only on a virtual
-# console I usually leave idle.
-#
-#daemon,mail.*;\
-# news.=crit;news.=err;news.=notice;\
-# *.=debug;*.=info;\
-# *.=notice;*.=warn /dev/tty8
-
-# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
-# you must invoke `xconsole' with the `-file' option:
-#
-# $ xconsole -file /dev/xconsole [...]
-#
-# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
-# busy site..
-#
-daemon.*;mail.*;\
- news.err;\
- *.=debug;*.=info;\
- *.=notice;*.=warn |/dev/xconsole
diff --git a/remote/modules/rsyslogd/rsyslogd.conf.zypper b/remote/modules/rsyslogd/rsyslogd.conf.zypper
index 48bcaa46..782503e2 100644
--- a/remote/modules/rsyslogd/rsyslogd.conf.zypper
+++ b/remote/modules/rsyslogd/rsyslogd.conf.zypper
@@ -1,5 +1,3 @@
REQUIRED_BINARIES=" rsyslogd
rsyslog-service-prepare"
REQUIRED_PACKAGES=" rsyslog"
-REQUIRED_DIRECTORIES=" /etc/rsyslog.d
- /usr/lib/rsyslog"