From 11a6046bbdcfef03117b6432646bb79813817fcd Mon Sep 17 00:00:00 2001 From: Bastian Wissler Date: Thu, 18 Dec 2008 17:04:17 +0000 Subject: initramfs: * syslogd now started with 20>debug>=3 git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2440 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/stage3-stuff/init | 26 +++++----------------- .../syslog/init-hooks/15-have-ip-config/syslog.sh | 7 +++++- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/initramfs/stage3-stuff/init b/initramfs/stage3-stuff/init index a0fec57d..918f84ef 100755 --- a/initramfs/stage3-stuff/init +++ b/initramfs/stage3-stuff/init @@ -124,26 +124,8 @@ for opts in $(sed "s/#.*//" /etc/initramfs-setup) ${KCMDLINE} ; do shutdown) cat </proc/sysrq-trigger ;; @@ -173,6 +155,10 @@ in $0\ncountry=\"${COUNTRY}\"" >>/etc/initramfs-setup echo -e "#!/bin/ash\nash" >/bin/debugshell chmod u+x /bin/debugshell getty -i -n -l /bin/debugshell 38400 tty2 & + # start logging (debuglevel >=3) + echo "Syslog started on third console (tty3)" + syslogd -C2048 + logread -f > /dev/tty3 & fi ;; # essid for WLAN boot (experimental, might be moved to a module component diff --git a/os-plugins/plugins/syslog/init-hooks/15-have-ip-config/syslog.sh b/os-plugins/plugins/syslog/init-hooks/15-have-ip-config/syslog.sh index 3c3a1d13..f0ca370f 100644 --- a/os-plugins/plugins/syslog/init-hooks/15-have-ip-config/syslog.sh +++ b/os-plugins/plugins/syslog/init-hooks/15-have-ip-config/syslog.sh @@ -4,7 +4,12 @@ if [ -e /initramfs/plugin-conf/syslog.conf ]; then # TODO: maybe limit the maximum log file size via rotation? params="-s 0" if [ -n "$syslog_host" ]; then - params="$params -R ${syslog_host}:${syslog_port}" + if [ -n "${syslog_port}" ]; then + host="${syslog_host}:${syslog_port}" + else + host="${syslog_host}" + fi + params="$params -R ${host}" fi echo "syslogd $params ..." syslogd $params >/dev/null 2>&1 -- cgit v1.2.3-55-g7522