file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \
"
-# syslog initscript is handled explicitly because order of
-# update-rc.d and update-alternatives is important (see below)
-DEPENDS_append = " update-rc.d update-rc.d-native"
-RDEPENDS_${PN}_append = " update-rc.d"
+inherit update-rc.d update-alternatives
SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
file://no-strip-install.patch \
install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
}
-pkg_preinst_${PN} () {
- # all this is needed to avoid sysmlink errors,
- # because update-rc.d runs before pkg_postinst
- ETC=$D${sysconfdir}
-
- if [ -e $ETC/init.d/syslog -a ! -L $ETC/init.d/syslog ]; then
- echo "WARNING:" "non symlink ${sysconfdir}/init.d/syslog exist -> backup to ${sysconfdir}/init.d/syslog.old"
- mv $ETC/init.d/syslog $ETC/init.d/syslog.old
- fi
- if [ ! -e $ETC/init.d/syslog ]; then
- ln -s dummy $ETC/init.d/syslog
- fi
-}
-
-inherit update-alternatives
-
ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf"
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
- OPT="-s"
- fi
- update-rc.d $OPT syslog defaults
-}
-
pkg_prerm_${PN} () {
if test "x$D" = "x"; then
if test "$1" = "upgrade" -o "$1" = "remove"; then
fi
fi
}
-
-pkg_postrm_${PN} () {
- if test "x$D" != "x"; then
- OPT="-r $D"
- else
- OPT=""
- fi
- if test "$1" = "remove" -o "$1" = "purge"; then
- if ! test -e "/etc/init.d/syslog"; then
- update-rc.d $OPT syslog remove
- fi
- fi
-}