summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/sysklogd/sysklogd.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/sysklogd/sysklogd.inc')
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd.inc43
1 files changed, 1 insertions, 42 deletions
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
index 151babb34a..11673283f6 100644
--- a/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -11,10 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
11 file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \ 11 file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \
12 " 12 "
13 13
14# syslog initscript is handled explicitly because order of 14inherit update-rc.d update-alternatives
15# update-rc.d and update-alternatives is important (see below)
16DEPENDS_append = " update-rc.d update-rc.d-native"
17RDEPENDS_${PN}_append = " update-rc.d"
18 15
19SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \ 16SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
20 file://no-strip-install.patch \ 17 file://no-strip-install.patch \
@@ -41,22 +38,6 @@ do_install () {
41 install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog 38 install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
42} 39}
43 40
44pkg_preinst_${PN} () {
45 # all this is needed to avoid sysmlink errors,
46 # because update-rc.d runs before pkg_postinst
47 ETC=$D${sysconfdir}
48
49 if [ -e $ETC/init.d/syslog -a ! -L $ETC/init.d/syslog ]; then
50 echo "WARNING:" "non symlink ${sysconfdir}/init.d/syslog exist -> backup to ${sysconfdir}/init.d/syslog.old"
51 mv $ETC/init.d/syslog $ETC/init.d/syslog.old
52 fi
53 if [ ! -e $ETC/init.d/syslog ]; then
54 ln -s dummy $ETC/init.d/syslog
55 fi
56}
57
58inherit update-alternatives
59
60ALTERNATIVE_PRIORITY = "100" 41ALTERNATIVE_PRIORITY = "100"
61 42
62ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf" 43ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf"
@@ -66,15 +47,6 @@ ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd"
66ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog" 47ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog"
67ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" 48ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
68 49
69pkg_postinst_${PN} () {
70 if test "x$D" != "x"; then
71 OPT="-r $D"
72 else
73 OPT="-s"
74 fi
75 update-rc.d $OPT syslog defaults
76}
77
78pkg_prerm_${PN} () { 50pkg_prerm_${PN} () {
79 if test "x$D" = "x"; then 51 if test "x$D" = "x"; then
80 if test "$1" = "upgrade" -o "$1" = "remove"; then 52 if test "$1" = "upgrade" -o "$1" = "remove"; then
@@ -82,16 +54,3 @@ pkg_prerm_${PN} () {
82 fi 54 fi
83 fi 55 fi
84} 56}
85
86pkg_postrm_${PN} () {
87 if test "x$D" != "x"; then
88 OPT="-r $D"
89 else
90 OPT=""
91 fi
92 if test "$1" = "remove" -o "$1" = "purge"; then
93 if ! test -e "/etc/init.d/syslog"; then
94 update-rc.d $OPT syslog remove
95 fi
96 fi
97}