summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/sysklogd
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/sysklogd')
-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
25SRC_URI_append_e500v2 = " file://no-vectorization.patch" 25SRC_URI_append_e500v2 = " file://no-vectorization.patch"
26 26
27INITSCRIPT_NAME = "syslog" 27INITSCRIPT_NAME = "syslog"
28CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${PN}" 28CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}"
29 29
30CFLAGS_append = " -DSYSV" 30CFLAGS_append = " -DSYSV"
31 31
@@ -35,12 +35,10 @@ do_install () {
35 ${D}${base_sbindir} 35 ${D}${base_sbindir}
36 oe_runmake 'BINDIR=${D}${base_sbindir}' \ 36 oe_runmake 'BINDIR=${D}${base_sbindir}' \
37 'MANDIR=${D}${mandir}' install 37 'MANDIR=${D}${mandir}' install
38 mv ${D}${base_sbindir}/syslogd ${D}${base_sbindir}/syslogd.${PN}
39 mv ${D}${base_sbindir}/klogd ${D}${base_sbindir}/klogd.${PN}
40 install -d ${D}${sysconfdir} 38 install -d ${D}${sysconfdir}
41 install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf.${PN} 39 install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
42 install -d ${D}${sysconfdir}/init.d 40 install -d ${D}${sysconfdir}/init.d
43 install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog.${PN} 41 install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
44} 42}
45 43
46pkg_preinst_${PN} () { 44pkg_preinst_${PN} () {
@@ -57,12 +55,18 @@ pkg_preinst_${PN} () {
57 fi 55 fi
58} 56}
59 57
60pkg_postinst_${PN} () { 58inherit update-alternatives
61 update-alternatives --install ${base_sbindir}/syslogd syslogd syslogd.${PN} 100 59
62 update-alternatives --install ${base_sbindir}/klogd klogd klogd.${PN} 100 60ALTERNATIVE_PRIORITY = "100"
63 update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 100 61
64 update-alternatives --install ${sysconfdir}/syslog.conf syslog-conf syslog.conf.${PN} 100 62ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf"
65 63
64ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
65ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd"
66ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog"
67ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
68
69pkg_postinst_${PN} () {
66 if test "x$D" != "x"; then 70 if test "x$D" != "x"; then
67 OPT="-r $D" 71 OPT="-r $D"
68 else 72 else
@@ -72,16 +76,11 @@ pkg_postinst_${PN} () {
72} 76}
73 77
74pkg_prerm_${PN} () { 78pkg_prerm_${PN} () {
75 update-alternatives --remove syslogd syslogd.${PN}
76 update-alternatives --remove klogd klogd.${PN}
77
78 if test "x$D" = "x"; then 79 if test "x$D" = "x"; then
79 if test "$1" = "upgrade" -o "$1" = "remove"; then 80 if test "$1" = "upgrade" -o "$1" = "remove"; then
80 /etc/init.d/syslog stop 81 /etc/init.d/syslog stop
81 fi 82 fi
82 fi 83 fi
83 update-alternatives --remove syslog-init syslog.${PN}
84 update-alternatives --remove syslog-conf syslog.conf.${PN}
85} 84}
86 85
87pkg_postrm_${PN} () { 86pkg_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 @@
1require sysklogd.inc 1require sysklogd.inc
2PR = "r5" 2PR = "r6"
3 3
4SRC_URI[md5sum] = "e053094e8103165f98ddafe828f6ae4b" 4SRC_URI[md5sum] = "e053094e8103165f98ddafe828f6ae4b"
5SRC_URI[sha256sum] = "6169b8e91d29288e90404f01462b69e7f2afb1161aa419826fe4736c7f9eb773" 5SRC_URI[sha256sum] = "6169b8e91d29288e90404f01462b69e7f2afb1161aa419826fe4736c7f9eb773"