summaryrefslogtreecommitdiff
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-05-21 16:18:58 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 10:45:33 +0100
commitc32dca4013d851aeb9d661a25cab81daf213121f (patch)
treec6f6523c61753b9f9380d81616254086909d01f9 /meta/recipes-extended
parent867864451baa875f48d87f4b8dbce80a90038243 (diff)
downloadopenembedded-core-c32dca4013d851aeb9d661a25cab81daf213121f.tar.gz
openembedded-core-c32dca4013d851aeb9d661a25cab81daf213121f.tar.bz2
openembedded-core-c32dca4013d851aeb9d661a25cab81daf213121f.zip
sysklogd: use new update-alternatives
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd.inc29
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd_1.5.bb2
2 files changed, 15 insertions, 16 deletions
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
index fb2ddb2013..151babb34a 100644
--- a/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -25,7 +25,7 @@ SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar
SRC_URI_append_e500v2 = " file://no-vectorization.patch"
INITSCRIPT_NAME = "syslog"
-CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${PN}"
+CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}"
CFLAGS_append = " -DSYSV"
@@ -35,12 +35,10 @@ do_install () {
${D}${base_sbindir}
oe_runmake 'BINDIR=${D}${base_sbindir}' \
'MANDIR=${D}${mandir}' 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.${PN}
+ install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
install -d ${D}${sysconfdir}/init.d
- install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog.${PN}
+ install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
}
pkg_preinst_${PN} () {
@@ -57,12 +55,18 @@ pkg_preinst_${PN} () {
fi
}
-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
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf"
+ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
+ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd"
+ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog"
+ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
+
+pkg_postinst_${PN} () {
if test "x$D" != "x"; then
OPT="-r $D"
else
@@ -72,16 +76,11 @@ pkg_postinst_${PN} () {
}
pkg_prerm_${PN} () {
- update-alternatives --remove syslogd syslogd.${PN}
- update-alternatives --remove klogd klogd.${PN}
-
if test "x$D" = "x"; then
if test "$1" = "upgrade" -o "$1" = "remove"; then
/etc/init.d/syslog stop
fi
fi
- update-alternatives --remove syslog-init syslog.${PN}
- update-alternatives --remove syslog-conf syslog.conf.${PN}
}
pkg_postrm_${PN} () {
diff --git a/meta/recipes-extended/sysklogd/sysklogd_1.5.bb b/meta/recipes-extended/sysklogd/sysklogd_1.5.bb
index b58094e69e..471c8c85bf 100644
--- a/meta/recipes-extended/sysklogd/sysklogd_1.5.bb
+++ b/meta/recipes-extended/sysklogd/sysklogd_1.5.bb
@@ -1,5 +1,5 @@
require sysklogd.inc
-PR = "r5"
+PR = "r6"
SRC_URI[md5sum] = "e053094e8103165f98ddafe828f6ae4b"
SRC_URI[sha256sum] = "6169b8e91d29288e90404f01462b69e7f2afb1161aa419826fe4736c7f9eb773"