]> code.ossystems Code Review - openembedded-core.git/commitdiff
busybox/sysklogd: syslog.conf files
authorMark Hatle <mark.hatle@windriver.com>
Wed, 20 Oct 2010 19:50:50 +0000 (14:50 -0500)
committerRichard Purdie <rpurdie@linux.intel.com>
Thu, 21 Oct 2010 13:05:57 +0000 (14:05 +0100)
The format of the syslog.conf files is different between busybox and sysklogd.

Use the alternatives method to ensure we get the correct config file for
any specific configurations.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
meta/recipes-core/busybox/busybox.inc
meta/recipes-core/busybox/busybox_1.16.2.bb
meta/recipes-extended/sysklogd/sysklogd.inc
meta/recipes-extended/sysklogd/sysklogd_1.5.bb

index b8c009c1d3cfaeb9a5565bbae9abd5408260dc93..24f9120a221bbc45f35f5d07c6dbe93f711b7c04 100644 (file)
@@ -19,7 +19,7 @@ INITSCRIPT_PACKAGES = "${PN} ${PN}-httpd ${PN}-udhcpd"
 INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
 INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" 
 INITSCRIPT_NAME_${PN} = "syslog"
-CONFFILES_${PN} = "${sysconfdir}/syslog.conf"
+CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${PN}"
 
 # This disables the syslog startup links in slugos (see slugos-init)
 INITSCRIPT_PARAMS_${PN}_slugos = "start 20 ."
@@ -54,7 +54,7 @@ do_install () {
        test -h ${D}/busybox${base_bindir}/sh && mv ${D}/busybox${base_bindir}/sh ${D}${base_bindir}/
 
        install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${PN}
-       install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
+       install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf.${PN}
        if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
                # Move crond back to /usr/sbin/crond
                install -d ${D}${sbindir}
@@ -109,6 +109,7 @@ pkg_postinst_${PN} () {
        while read link; do case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; bn=`basename $link`; update-alternatives --install $link $bn $to 50; done <$D/etc/busybox.links
 
        update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 50
+       update-alternatives --install ${sysconfdir}/syslog.conf syslog-conf syslog.conf.${PN} 50
 }
 
 pkg_prerm_${PN} () {
@@ -149,4 +150,6 @@ pkg_prerm_${PN} () {
        fi
 
        update-alternatives --remove syslog-init syslog.${PN}
+       update-alternatives --remove syslog-conf syslog.conf.${PN}
 }
+
index 80dbeaba60fa515f8a64063d70ecc4da05deaf9d..82a62711e50ac6aff3696df2bafc1ae0ce2230f2 100644 (file)
@@ -1,5 +1,5 @@
 require busybox.inc
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://udhcpscript.patch \
index 9bd77280aa7045849cafbad5f3b00e1154bf5bf2..11832b5a2000b73a47c555fe4387acbef4229c02 100644 (file)
@@ -22,6 +22,7 @@ SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar
            "
 
 INITSCRIPT_NAME = "syslog"
+CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${PN}"
 
 CFLAGS_append = " -DSYSV"
 
@@ -34,7 +35,7 @@ do_install () {
        mv ${D}${base_sbindir}/syslogd ${D}${base_sbindir}/syslogd.${PN}
        mv ${D}${base_sbindir}/klogd ${D}${base_sbindir}/klogd.${PN}
        install -d ${D}${sysconfdir}
-       install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
+       install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf.${PN}
        install -d ${D}${sysconfdir}/init.d
        install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog.${PN}
 }
@@ -55,6 +56,7 @@ pkg_postinst_${PN} () {
        update-alternatives --install ${base_sbindir}/syslogd syslogd syslogd.${PN} 100
        update-alternatives --install ${base_sbindir}/klogd klogd klogd.${PN} 100
        update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 100
+       update-alternatives --install ${sysconfdir}/syslog.conf syslog-conf syslog.conf.${PN} 100
 
        if test "x$D" != "x"; then
        OPT="-r $D"
@@ -74,6 +76,7 @@ pkg_prerm_${PN} () {
        fi
        fi
        update-alternatives --remove syslog-init syslog.${PN}
+       update-alternatives --remove syslog-conf syslog.conf.${PN}
 }
 
 pkg_postrm_${PN} () {
index 27146c79adc8f88fba76b967d302456fe857791c..75c1147bc6811c3b6f56de66f7ecf74cf07e49d7 100644 (file)
@@ -1,2 +1,2 @@
 require sysklogd.inc
-PR = "r1"
+PR = "r2"