Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/1] sysvinit: modify bootlog location
@ 2013-05-08 23:03 Joe Slater
  2013-05-10  9:42 ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Slater @ 2013-05-08 23:03 UTC (permalink / raw)
  To: openembedded-core

The default location for bootlog is volatile,
so we change it to something that is not.
---
 meta/recipes-core/sysvinit/sysvinit/bootlogd.init |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
index f8f07a0..4422166 100755
--- a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
+++ b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
@@ -37,6 +37,19 @@ case "$0" in
 		;;
 esac
 
+# default /var/log/boot is not an option since /var/log becomes
+# /var/volatile/log
+logfile=/var/local/bootlogd.log
+
+#
+# Create initial log files
+#
+if [ ! -f "$logfile" ] && touch "$logfile" >/dev/null 2>&1; then
+	echo "(Nothing has been logged yet.)" >| "$logfile"
+	chown root:adm "$logfile"
+	chmod 640 "$logfile"
+fi
+
 case "$ACTION" in
 	start)
 		echo -n "Starting $DESC: "
@@ -44,9 +57,9 @@ case "$ACTION" in
 		then
 			umask 027
 			start-stop-daemon --start --quiet \
-				--exec $DAEMON -- -r
+				--exec $DAEMON -- -r -l $logfile
 		else
-			$DAEMON -r
+			$DAEMON -r -l $logfile
 		fi
 		echo "$NAME."
 		;;
@@ -70,7 +83,7 @@ case "$ACTION" in
 		echo -n "Restarting $DESC: "
 		start-stop-daemon --stop --quiet --exec $DAEMON
 		sleep 1
-		start-stop-daemon --start --quiet --exec $DAEMON
+		start-stop-daemon --start --quiet --exec $DAEMON -- -l $logfile
 		echo "$NAME."
 		;;
 	*)
-- 
1.7.3.4




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] sysvinit: modify bootlog location
  2013-05-08 23:03 [PATCH 1/1] sysvinit: modify bootlog location Joe Slater
@ 2013-05-10  9:42 ` Burton, Ross
  2013-05-10 22:00   ` Saul Wold
  0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2013-05-10  9:42 UTC (permalink / raw)
  To: Joe Slater; +Cc: openembedded-core

On 9 May 2013 00:03, Joe Slater <jslater@windriver.com> wrote:
> The default location for bootlog is volatile,
> so we change it to something that is not.

If this is a problem, why not make /var/log not volatile?  I never
understood why the log directory was volatile to be honest.

Ross



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] sysvinit: modify bootlog location
  2013-05-10  9:42 ` Burton, Ross
@ 2013-05-10 22:00   ` Saul Wold
  2013-05-13 22:36     ` Slater, Joseph
  0 siblings, 1 reply; 5+ messages in thread
From: Saul Wold @ 2013-05-10 22:00 UTC (permalink / raw)
  To: Burton, Ross, Joe Slater; +Cc: openembedded-core

On 05/10/2013 02:42 AM, Burton, Ross wrote:
> On 9 May 2013 00:03, Joe Slater <jslater@windriver.com> wrote:
>> The default location for bootlog is volatile,
>> so we change it to something that is not.
>
> If this is a problem, why not make /var/log not volatile?  I never
> understood why the log directory was volatile to be honest.
>
How would we handle the Read-Only FS situation?

Sau!

> Ross
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] sysvinit: modify bootlog location
  2013-05-10 22:00   ` Saul Wold
@ 2013-05-13 22:36     ` Slater, Joseph
  2013-05-14  3:25       ` ChenQi
  0 siblings, 1 reply; 5+ messages in thread
From: Slater, Joseph @ 2013-05-13 22:36 UTC (permalink / raw)
  To: Saul Wold, Burton, Ross; +Cc: openembedded-core@lists.openembedded.org



> -----Original Message-----
> From: Saul Wold [mailto:sgw@linux.intel.com]
> Sent: Friday, May 10, 2013 3:00 PM
> To: Burton, Ross; Slater, Joseph
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH 1/1] sysvinit: modify bootlog location
> 
> On 05/10/2013 02:42 AM, Burton, Ross wrote:
> > On 9 May 2013 00:03, Joe Slater <jslater@windriver.com> wrote:
> >> The default location for bootlog is volatile,
> >> so we change it to something that is not.
> >
> > If this is a problem, why not make /var/log not volatile?  I never
> > understood why the log directory was volatile to be honest.
> >
> How would we handle the Read-Only FS situation?

Maybe we could change around the creation of bootlogd.log such that,
if /var/local were not writeable, we'd stick it in /var/log.

Joe


> 
> Sau!
> 
> > Ross
> >
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> >
> >



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] sysvinit: modify bootlog location
  2013-05-13 22:36     ` Slater, Joseph
@ 2013-05-14  3:25       ` ChenQi
  0 siblings, 0 replies; 5+ messages in thread
From: ChenQi @ 2013-05-14  3:25 UTC (permalink / raw)
  To: openembedded-core

On 05/14/2013 06:36 AM, Slater, Joseph wrote:
>
>> -----Original Message-----
>> From: Saul Wold [mailto:sgw@linux.intel.com]
>> Sent: Friday, May 10, 2013 3:00 PM
>> To: Burton, Ross; Slater, Joseph
>> Cc: openembedded-core@lists.openembedded.org
>> Subject: Re: [OE-core] [PATCH 1/1] sysvinit: modify bootlog location
>>
>> On 05/10/2013 02:42 AM, Burton, Ross wrote:
>>> On 9 May 2013 00:03, Joe Slater <jslater@windriver.com> wrote:
>>>> The default location for bootlog is volatile,
>>>> so we change it to something that is not.
>>> If this is a problem, why not make /var/log not volatile?  I never
>>> understood why the log directory was volatile to be honest.
>>>
>> How would we handle the Read-Only FS situation?
> Maybe we could change around the creation of bootlogd.log such that,
> if /var/local were not writeable, we'd stick it in /var/log.
>
> Joe
>
Hi all,

I once wanted to make /var/log not volatile, but then I realised that 
not preserving logs between reboots doesn't seem to bother any user, so 
I dropped the patches and marked the bug NOTABUG.
(https://bugzilla.yoctoproject.org/show_bug.cgi?id=3397)

So the key problem here is, are we going to preserve logs between reboots?

If so, we can make /var/log not volatile, in the same way Laurentiu did 
with /var/cache, and add the following lines to the 
read-only-rootfs-hook.sh script to make things work in case of a 
read-only filesystem.

mkdir -p /var/volatile/log
mount --bind /var/volatile/log /var/log

Best Regards,
Chen Qi


>> Sau!
>>
>>> Ross
>>>
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>>
>>>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-14  3:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-08 23:03 [PATCH 1/1] sysvinit: modify bootlog location Joe Slater
2013-05-10  9:42 ` Burton, Ross
2013-05-10 22:00   ` Saul Wold
2013-05-13 22:36     ` Slater, Joseph
2013-05-14  3:25       ` ChenQi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox