[oe] [PATCH v2] various syslogs: keep syslog running as long as possible on shutdown

Steffen Sledz sledz at dresearch.de
Tue Aug 31 10:23:39 UTC 2010


Signed-off-by: Steffen Sledz <sledz at dresearch.de>
---
 recipes/busybox/busybox.inc   |    7 +++++--
 recipes/rsyslog/rsyslog.inc   |    7 +++++--
 recipes/sysklogd/sysklogd.inc |    7 +++++--
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index 96d9bb1..1046b2f 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -11,7 +11,7 @@ LICENSE = "GPLv2"
 SECTION = "base"
 PRIORITY = "required"
 
-INC_PR = "r33"
+INC_PR = "r34"
 
 SRC_URI = "\
   file://busybox-cron \
@@ -257,7 +257,10 @@ pkg_postinst_${PN}-syslog () {
 	else
 		OPT="-s"
 	fi
-	update-rc.d $OPT syslog defaults
+	# remove all rc.d-links potentially created from alternative
+	# syslog packages before creating new ones
+	update-rc.d $OPT -f syslog remove
+	update-rc.d $OPT syslog start 20 2 3 4 5 . stop 90 0 1 6 .
 }
 
 pkg_prerm_${PN}-syslog () {
diff --git a/recipes/rsyslog/rsyslog.inc b/recipes/rsyslog/rsyslog.inc
index a3bd125..8f67130 100644
--- a/recipes/rsyslog/rsyslog.inc
+++ b/recipes/rsyslog/rsyslog.inc
@@ -2,7 +2,7 @@ DESCRIPTION = "Rsyslog is an enhanced multi-threaded syslogd"
 DEPENDS = "zlib"
 HOMEPAGE = "http://www.rsyslog.com/"
 LICENSE = "GPLv3"
-INC_PR = "r1"
+INC_PR = "r2"
 
 SRC_URI = "http://www.rsyslog.com/files/download/rsyslog/${PN}-${PV}.tar.gz \
           file://rsyslog.conf \
@@ -31,7 +31,10 @@ pkg_postinst_${PN} () {
 	else
 		OPT="-s"
 	fi
-	update-rc.d $OPT syslog defaults
+	# remove all rc.d-links potentially created from alternative
+	# syslog packages before creating new ones
+	update-rc.d $OPT -f syslog remove
+	update-rc.d $OPT syslog start 20 2 3 4 5 . stop 90 0 1 6 .
 }
 
 pkg_prerm_${PN} () {
diff --git a/recipes/sysklogd/sysklogd.inc b/recipes/sysklogd/sysklogd.inc
index f25af53..833fe6a 100644
--- a/recipes/sysklogd/sysklogd.inc
+++ b/recipes/sysklogd/sysklogd.inc
@@ -1,7 +1,7 @@
 LICENSE = "GPL"
 SECTION = "base"
 DESCRIPTION = "The sysklogd package implements two system log daemons."
-INC_PR = "r3"
+INC_PR = "r4"
 
 SRC_URI = "http://www.ibiblio.org/pub/Linux/system/daemons/sysklogd-${PV}.tar.gz \
 	       file://nonrootinstall.patch \
@@ -52,7 +52,10 @@ pkg_postinst_${PN} () {
     else
 	OPT="-s"
     fi
-    update-rc.d $OPT syslog defaults
+    # remove all rc.d-links potentially created from alternative
+    # syslog packages before creating new ones
+    update-rc.d $OPT -f syslog remove
+    update-rc.d $OPT syslog start 20 2 3 4 5 . stop 90 0 1 6 .
 }
 
 pkg_prerm_${PN} () {
-- 
1.7.1





More information about the Openembedded-devel mailing list