* [Buildroot] [PATCH 1/2] package/sysvinit: don't start logging
@ 2014-10-08 14:39 Gustavo Zacarias
2014-10-08 14:39 ` [Buildroot] [PATCH 2/2] sysklogd: add initscript Gustavo Zacarias
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Gustavo Zacarias @ 2014-10-08 14:39 UTC (permalink / raw)
To: buildroot
Don't try to start logging from /etc/inittab because busybox installs a
S01logging script that handles that and can lead to duplicate logging
processes.
Let's handle the logging in each package that provides it since we can
get multiple variants in the future like syslog-ng that have different
initialization routines.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/sysvinit/inittab | 7 -------
1 file changed, 7 deletions(-)
diff --git a/package/sysvinit/inittab b/package/sysvinit/inittab
index 8812cca..d3de4a7 100644
--- a/package/sysvinit/inittab
+++ b/package/sysvinit/inittab
@@ -17,16 +17,9 @@ init::sysinit:/etc/init.d/rcS
# S0:1:respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL
-# Logging junk
-mess::sysinit:/bin/touch /var/log/messages
-sysl:1:respawn:/sbin/syslogd -n -m 0
-klog:1:respawn:/sbin/klogd -n
-
# Stuff to do for the 3-finger salute
rebo::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting
-sklo:6:wait:/usr/bin/killall klogd
-ssys:6:wait:/usr/bin/killall syslogd
umou:6:wait:/bin/umount -a -r
swap:6:wait:/sbin/swapoff -a
--
2.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] sysklogd: add initscript
2014-10-08 14:39 [Buildroot] [PATCH 1/2] package/sysvinit: don't start logging Gustavo Zacarias
@ 2014-10-08 14:39 ` Gustavo Zacarias
2014-10-12 11:02 ` Peter Korsgaard
2014-10-08 15:02 ` [Buildroot] [PATCH 1/2] package/sysvinit: don't start logging Markos Chandras
2014-10-12 11:02 ` Peter Korsgaard
2 siblings, 1 reply; 5+ messages in thread
From: Gustavo Zacarias @ 2014-10-08 14:39 UTC (permalink / raw)
To: buildroot
Since we don't handle it in sysvinit inittab any longer let's add an
initscript to get things back into plug-and-play shape.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/sysklogd/S01logging | 25 +++++++++++++++++++++++++
package/sysklogd/sysklogd.mk | 5 +++++
2 files changed, 30 insertions(+)
create mode 100644 package/sysklogd/S01logging
diff --git a/package/sysklogd/S01logging b/package/sysklogd/S01logging
new file mode 100644
index 0000000..a0b683f
--- /dev/null
+++ b/package/sysklogd/S01logging
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+case "$1" in
+ start)
+ echo -n "Starting logging: "
+ /sbin/syslogd -m 0
+ /sbin/klogd
+ echo "OK"
+ ;;
+ stop)
+ echo -n "Stopping logging: "
+ [ -f /var/run/klogd.pid ] && kill `cat /var/run/klogd.pid`
+ [ -f /var/run/syslogd.pid ] && kill `cat /var/run/syslogd.pid`
+ echo "OK"
+ ;;
+ restart|reload)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
diff --git a/package/sysklogd/sysklogd.mk b/package/sysklogd/sysklogd.mk
index efc5a4d..2b60b45 100644
--- a/package/sysklogd/sysklogd.mk
+++ b/package/sysklogd/sysklogd.mk
@@ -27,4 +27,9 @@ define SYSKLOGD_INSTALL_TARGET_CMDS
fi
endef
+define SYSKLOGD_INSTALL_INIT_SYSV
+ $(INSTALL) -m 755 -D package/sysklogd/S01logging \
+ $(TARGET_DIR)/etc/init.d/S01logging
+endef
+
$(eval $(generic-package))
--
2.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] package/sysvinit: don't start logging
2014-10-08 14:39 [Buildroot] [PATCH 1/2] package/sysvinit: don't start logging Gustavo Zacarias
2014-10-08 14:39 ` [Buildroot] [PATCH 2/2] sysklogd: add initscript Gustavo Zacarias
@ 2014-10-08 15:02 ` Markos Chandras
2014-10-12 11:02 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Markos Chandras @ 2014-10-08 15:02 UTC (permalink / raw)
To: buildroot
On 10/08/2014 03:39 PM, Gustavo Zacarias wrote:
> Don't try to start logging from /etc/inittab because busybox installs a
> S01logging script that handles that and can lead to duplicate logging
> processes.
> Let's handle the logging in each package that provides it since we can
> get multiple variants in the future like syslog-ng that have different
> initialization routines.
>
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
Thanks. That has always been bugging me but never got around to fix it
myself
Reviewed-by: Markos Chandras <markos.chandras@imgtec.com>
--
markos
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] package/sysvinit: don't start logging
2014-10-08 14:39 [Buildroot] [PATCH 1/2] package/sysvinit: don't start logging Gustavo Zacarias
2014-10-08 14:39 ` [Buildroot] [PATCH 2/2] sysklogd: add initscript Gustavo Zacarias
2014-10-08 15:02 ` [Buildroot] [PATCH 1/2] package/sysvinit: don't start logging Markos Chandras
@ 2014-10-12 11:02 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2014-10-12 11:02 UTC (permalink / raw)
To: buildroot
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:
> Don't try to start logging from /etc/inittab because busybox installs a
> S01logging script that handles that and can lead to duplicate logging
> processes.
> Let's handle the logging in each package that provides it since we can
> get multiple variants in the future like syslog-ng that have different
> initialization routines.
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] sysklogd: add initscript
2014-10-08 14:39 ` [Buildroot] [PATCH 2/2] sysklogd: add initscript Gustavo Zacarias
@ 2014-10-12 11:02 ` Peter Korsgaard
0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2014-10-12 11:02 UTC (permalink / raw)
To: buildroot
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:
> Since we don't handle it in sysvinit inittab any longer let's add an
> initscript to get things back into plug-and-play shape.
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-12 11:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-08 14:39 [Buildroot] [PATCH 1/2] package/sysvinit: don't start logging Gustavo Zacarias
2014-10-08 14:39 ` [Buildroot] [PATCH 2/2] sysklogd: add initscript Gustavo Zacarias
2014-10-12 11:02 ` Peter Korsgaard
2014-10-08 15:02 ` [Buildroot] [PATCH 1/2] package/sysvinit: don't start logging Markos Chandras
2014-10-12 11:02 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox