The following changes were made

* killproc in init script now properly uses PID files
  * pidofproc now checks PID files in init script
  * Will no longer attempt to start klogd if running in container
  * Updated default syslog.conf to prevent annoying 'noone' errors
  * Updated usher to use /bin/sh
  * Removed chroot from usher (will be performed by latest snap)
This commit is contained in:
2017-12-02 16:51:21 -06:00
parent 9f9452db63
commit a17524bbcf
4 changed files with 53 additions and 41 deletions

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
set -e
@@ -7,21 +7,18 @@ case $1 in
exit 0
;;
postinst)
if [ ! -f ${TARGET}/etc/syslog.conf ]; then
install -m 644 ${TARGET}/usr/share/sysklogd/syslog.conf \
${TARGET}/etc/syslog.conf
if [ ! -f /etc/syslog.conf ]; then
install -m 644 /usr/share/sysklogd/syslog.conf /etc/syslog.conf
fi
if [ ! -f ${TARGET}/etc/default/sysklogd ]; then
install -m 644 ${TARGET}/usr/share/sysklogd/sysklogd.default \
${TARGET}/etc/default/sysklogd
if [ ! -f /etc/default/sysklogd ]; then
install -m 644 /usr/share/sysklogd/sysklogd.default /etc/default/sysklogd
fi
if [[ ! ${TARGET} ]]; then
if [ -f /var/run/syslogd.pid ]; then
/etc/init.d/sysklogd restart
update-rc enable sysklogd
else
chroot ${TARGET} update-rc enable sysklogd
fi
update-rc enable sysklogd
;;
prerm)
exit 0