ports/core (2.4): rc: make it easier to replace sysklogd with alternatives (patch by predatorfreak)
commit 687807e26fb20882919725b7ea54b64cf3f25a98 Author: Simone Rota <sip@crux.nu> Date: Thu Oct 11 21:40:23 2007 +0200 rc: make it easier to replace sysklogd with alternatives (patch by predatorfreak) diff --git a/rc/.md5sum b/rc/.md5sum index 75f8382..0a04fef 100644 --- a/rc/.md5sum +++ b/rc/.md5sum @@ -1,9 +1,9 @@ d2a8e98a8b10ba09b2a9da34326b526a inittab -c8f2ed995547e53032f3d80a6809f793 rc -28c073739fd671ed79bd50a0ffd6c644 rc.conf +94fc1f45a347449cd1945cb68818f5d5 rc +c8fe38143dffbbc628a7a33966fae408 rc.conf 5b09d4a67beb58022879fa9ce0f5af1b rc.fix d1be35927946756c68242f29c16ee983 rc.local 394d5cff98ab59fd1a0ec64fe79292cb rc.modules -42fd4564bd4b5ad2ec26993c7fec3568 rc.multi +f45e1bfe3080d1686cf901715dbcb37d rc.multi b509225319fbdcf5a2dcc1a1f9fc8783 rc.shutdown -1b75f0b8113cd2456e024c0372b9c950 rc.single +9a19749d4d924948281beb167ccebe28 rc.single diff --git a/rc/Pkgfile b/rc/Pkgfile index 44d4d72..335b7c3 100644 --- a/rc/Pkgfile +++ b/rc/Pkgfile @@ -4,7 +4,7 @@ name=rc version=2.17 -release=5 +release=6 source=(inittab rc rc.modules rc.single rc.multi rc.local rc.fix rc.shutdown rc.conf) build() { diff --git a/rc/rc b/rc/rc index 4a5848d..ceb7ed7 100755 --- a/rc/rc +++ b/rc/rc @@ -76,10 +76,6 @@ if [ "$TIMEZONE" ]; then fi /sbin/hwclock --hctosys -# Start log daemons -/usr/sbin/syslogd -/usr/sbin/klogd -c 4 - # Load console font if [ "$FONT" ]; then echo "font: $FONT" diff --git a/rc/rc.conf b/rc/rc.conf index 81c1561..6c28c05 100644 --- a/rc/rc.conf +++ b/rc/rc.conf @@ -6,6 +6,7 @@ FONT=default KEYMAP=us TIMEZONE=UTC HOSTNAME=host +SYSLOG=sysklogd SERVICES=(net crond) # End of file diff --git a/rc/rc.multi b/rc/rc.multi index 1061fbf..f238d01 100755 --- a/rc/rc.multi +++ b/rc/rc.multi @@ -14,6 +14,10 @@ fi # Start services if [ "${SERVICES[*]}" ]; then echo -n "starting services:" + if [ -f /etc/rc.d/$SYSLOG -a -x /etc/rc.d/$SYSLOG ]; then + echo -n " $SYSLOG" + /etc/rc.d/$SYSLOG &> /dev/null || echo -n "[ERROR]" + fi for service in ${SERVICES[@]}; do echo -n " $service" /etc/rc.d/$service start &> /tmp/rc.$$ || echo -n "[ERROR]" diff --git a/rc/rc.single b/rc/rc.single index 8534347..7b1e298 100755 --- a/rc/rc.single +++ b/rc/rc.single @@ -26,13 +26,14 @@ if [ "$PREVLEVEL" != "N" ]; then /bin/sleep 5 /sbin/killall5 -9 - # Start udev - /bin/mount -n -t proc none /proc - /bin/mount -n -t sysfs none /sys - /sbin/start_udev - - /usr/sbin/syslogd - /usr/sbin/klogd -c 4 + # Start udev + /bin/mount -n -t proc none /proc + /bin/mount -n -t sysfs none /sys + /sbin/start_udev + + if [ -f /etc/rc.d/$SYSLOG -a -x /etc/rc.d/$SYSLOG ]; then + /etc/rc.d/$SYSLOG &> /dev/null + fi fi if [ "$RUNLEVEL" = "1" ]; then
participants (1)
-
crux@crux.nu