Big script

This commit is contained in:
2026-03-20 15:09:30 +01:00
parent dc2ac2f768
commit a2ca02a856
92 changed files with 5842 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
#!/bin/bash
# ============================================================================
# DarkForge Linux — Phase 3, Chapter 8: sysklogd
# ============================================================================
# Purpose: Build sysklogd (syslog daemon for system logging).
# Provides syslogd and klogd for capturing kernel and system messages.
# Inputs: /sources/sysklogd-2.7.0.tar.gz
# Outputs: syslogd, klogd in /usr/sbin/, configuration in /etc/syslog.conf
# Assumes: Running inside chroot
# Ref: LFS 13.0 §8.83
# ============================================================================
set -euo pipefail
source /sources/toolchain-scripts/100-chroot-env.sh
PACKAGE="sysklogd"
VERSION="2.7.0"
echo "=== Building ${PACKAGE}-${VERSION} ==="
cd /sources
tar -xf "${PACKAGE}-${VERSION}.tar.gz"
cd "${PACKAGE}-${VERSION}"
make
make BINDIR=/usr/sbin install
# Create a basic syslog.conf if not present
if [ ! -f /etc/syslog.conf ]; then
cat > /etc/syslog.conf << "EOF"
# /etc/syslog.conf --- syslogd configuration file
*.*;auth,authpriv.none -/var/log/syslog
auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv.none -/var/log/syslog
kern.* -/var/log/kernel.log
mail.* -/var/log/mail.log
mail.err /var/log/mail.err
cron.* /var/log/cron.log
*.err /var/log/error.log
*.warn /var/log/warn.log
EOF
fi
cd /sources
rm -rf "${PACKAGE}-${VERSION}"
echo "=== ${PACKAGE}-${VERSION} complete ==="