lfs-scripts/scripts/chapter8/8.75-sysklogd.sh
2023-01-12 20:04:00 +05:30

34 lines
555 B
Bash

#!/bin/bash
cd /sources
tar xf sysklogd-1.5.1.tar.gz
cd sysklogd-1.5.1
sed -i '/Error loading kernel symbols/{n;n;d}' ksym_mod.c
sed -i 's/union wait/int/' syslogd.c
make -j5
if [ $? -ne 0 ]
then
exit 1
fi
make BINDIR=/sbin 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
cd /sources
rm -rf sysklogd-1.5.1