]> code.ossystems Code Review - openembedded-core.git/commitdiff
sysklogd: various fixes so it starts/stops cleanly
authorJoshua Lock <josh@linux.intel.com>
Wed, 1 Feb 2012 00:49:47 +0000 (16:49 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Feb 2012 18:26:50 +0000 (18:26 +0000)
This patch fixes several issues with the sysklogd recipe:
o Errors at start due to non-existent /var/log/news/ - every other log
  file is created in /var/log, not a sub-directory. Do the same for news
  logs.
o klogd would not be stopped due to pidfile recycling, give klogd its own
  pidfile
o preinstalls failed at rootfs creation time by trying to access the host
  root filesystem rather than a path relative to $D. Update the preinst to
  test for $D and do the right thing.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
meta/recipes-extended/sysklogd/files/sysklogd
meta/recipes-extended/sysklogd/files/syslog.conf
meta/recipes-extended/sysklogd/sysklogd.inc
meta/recipes-extended/sysklogd/sysklogd_1.5.bb

index e0fa7a8e1ef5e84638a62041d9b98ac9cbedf050..dcbc81e5a5645b04bff149fb3136eccf60b252a8 100755 (executable)
@@ -15,7 +15,7 @@
 PATH=/bin:/usr/bin:/sbin:/usr/sbin
 
 pidfile_syslogd=/var/run/syslogd.pid
-pidfile_klogd=/var/run/syslogd.pid
+pidfile_klogd=/var/run/klogd.pid
 binpath_syslogd=/sbin/syslogd
 binpath_klogd=/sbin/klogd
 
index 795d73545ad3c9e3e966f57a4490315bb14c19b4..7d1858ca5bbd8db3c2eca3f690de9688d64eb350 100644 (file)
@@ -26,9 +26,9 @@ mail.err                      /var/log/mail.err
 
 # Logging for INN news system
 #
-news.crit                      /var/log/news/news.crit
-news.err                       /var/log/news/news.err
-news.notice                    -/var/log/news/news.notice
+news.crit                      /var/log/news.crit
+news.err                       /var/log/news.err
+news.notice                    -/var/log/news.notice
 
 #
 # Some `catch-all' logfiles.
index 0b84dace96fc7df4f7fe549695e4df3c44edffca..fb2ddb201366101166a1db2de6168d816dd9b736 100644 (file)
@@ -46,12 +46,14 @@ do_install () {
 pkg_preinst_${PN} () {
        # all this is needed to avoid sysmlink errors,
        # because update-rc.d runs before pkg_postinst
-       if [ -e ${sysconfdir}/init.d/syslog -a ! -L ${sysconfdir}/init.d/syslog ]; then
+       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 ${sysconfdir}/init.d/syslog ${sysconfdir}/init.d/syslog.old
+               mv $ETC/init.d/syslog $ETC/init.d/syslog.old
        fi
-       if [ ! -e ${sysconfdir}/init.d/syslog ]; then
-               ln -s dummy ${sysconfdir}/init.d/syslog
+       if [ ! -e $ETC/init.d/syslog ]; then
+               ln -s dummy $ETC/init.d/syslog
        fi
 }
 
index 187c9f49b6e402f81835b1c0d1a84ab402ee228e..b58094e69e9f6f43be63794a44447bd11a7ea8e1 100644 (file)
@@ -1,5 +1,5 @@
 require sysklogd.inc
-PR = "r4"
+PR = "r5"
 
 SRC_URI[md5sum] = "e053094e8103165f98ddafe828f6ae4b"
 SRC_URI[sha256sum] = "6169b8e91d29288e90404f01462b69e7f2afb1161aa419826fe4736c7f9eb773"