aboutsummaryrefslogtreecommitdiffstats
path: root/chapter8/sysklogd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'chapter8/sysklogd.sh')
-rw-r--r--chapter8/sysklogd.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/chapter8/sysklogd.sh b/chapter8/sysklogd.sh
new file mode 100644
index 0000000..7d28f51
--- /dev/null
+++ b/chapter8/sysklogd.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+sed -i '/Error loading kernel symbols/{n;n;d}' ksym_mod.c
+sed -i 's/union wait/int/' syslogd.c
+
+make
+
+make BINDIR=/sbin -j1 install
+
+cat > /etc/syslog.conf << "EOF"
+# Begin /etc/syslog.conf
+
+auth,authpriv.* -/var/log/auth.log
+*.*;auth,authpriv.none -/var/log/sys.log
+daemon.* -/var/log/daemon.log
+kern.* -/var/log/kern.log
+mail.* -/var/log/mail.log
+user.* -/var/log/user.log
+*.emerg *
+
+# End /etc/syslog.conf
+EOF