From: Marco Stornelli <marco.stornelli@gmail.com>
To: Samo Pogacnik <samo_pogacnik@t-2.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-embedded <linux-embedded@vger.kernel.org>,
linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] console logging detour via printk
Date: Mon, 03 May 2010 19:05:23 +0200 [thread overview]
Message-ID: <4BDF0253.6030302@gmail.com> (raw)
In-Reply-To: <1272806987.2155.34.camel@itpsd6lap>
Il 02/05/2010 15:29, Samo Pogacnik ha scritto:
> Dne 02.05.2010 (ned) ob 11:58 +0200 je Marco Stornelli zapisal(a):
>> 01/05/2010 20:48, Samo Pogacnik wrote:
>>
>> Mmm...It's an interesting problem. I see in my distro (openSuse) a
>> script called boot.klog that it seems to perform that (even initrd
>> part). In the file boot.msg I can see the initial prints of the kernel
>> and user space scripts.
>>
> Thanks for the info.
> Is this boot.klog script from the initrd image or from the real rootfs?
> As you can see, i am still suspicious about the initrd part user console
> messages:)
>
> Samo
>
>
In the initrd there's the script blogd.sh:
if test -z "$fboot" -a -z "$quiet" -a -z "$REDIRECT" ; then
REDIRECT=$(showconsole 2>/dev/null)
if test -n "$REDIRECT" ; then
if test "$devpts" != "yes" ; then
mount -t devpts devpts /dev/pts
devpts=yes
fi
> /dev/shm/initrd.msg
ln -sf /dev/shm/initrd.msg /var/log/boot.msg
mkdir -p /var/run
/sbin/blogd $REDIRECT
fi
fi
And in the rootfs the boot.klog script:
# Read all kernel messages generated until now and put them in one file.
test -s /var/log/boot.msg && mv -f /var/log/boot.msg /var/log/boot.omsg
echo Creating /var/log/boot.msg
if test -x /sbin/klogd ; then
# klogd syncs out the file
/sbin/klogd -s -o -n -f /var/log/boot.msg
test -s /var/log/boot.msg
rc_status -v1 -r
elif test -x /bin/dmesg ; then
/bin/dmesg > /var/log/boot.msg
/bin/sync
test -s /var/log/boot.msg
rc_status -v1 -r
fi
if test -e /dev/shm/initrd.msg ; then
cat /dev/shm/initrd.msg >> /var/log/boot.msg
rm -f /dev/shm/initrd.msg
fi
[ --- cut here --- ]
Regards,
Marco
prev parent reply other threads:[~2010-05-03 17:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-30 22:03 [PATCH] console logging detour via printk Samo Pogacnik
2010-04-30 22:45 ` Randy Dunlap
2010-05-01 8:37 ` Samo Pogacnik
2010-05-01 22:23 ` Samo Pogacnik
2010-05-01 9:00 ` Geert Uytterhoeven
2010-05-01 16:36 ` Samo Pogacnik
2010-05-01 21:03 ` Samo Pogacnik
2010-05-01 11:04 ` Alan Cox
2010-05-01 18:48 ` Samo Pogacnik
2010-05-01 19:41 ` Alan Cox
2010-05-01 22:45 ` Samo Pogacnik
2010-05-02 9:58 ` Marco Stornelli
2010-05-02 13:29 ` Samo Pogacnik
2010-05-03 17:05 ` Marco Stornelli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BDF0253.6030302@gmail.com \
--to=marco.stornelli@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=samo_pogacnik@t-2.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.