Mail archive
alpine-devel

Re: [alpine-devel] [PATCH] inetutils-syslogd - small correction to init.d $pidfile

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Fri, 22 Nov 2013 16:04:23 +0100

On Thu, 21 Nov 2013 19:10:15 +0000
IT Offshore <developer_at_it-offshore.co.uk> wrote:

> Correcting $pid_file to syslog.pid not syslogd.pid
>
> Disabled INN News settings in syslog.conf (no INN Package in Alpine)
> ---
> testing/inetutils-syslogd/inetutils-syslogd.initd | 11 ++++++-----
> testing/inetutils-syslogd/syslog.conf | 6 +++---
> 2 files changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/testing/inetutils-syslogd/inetutils-syslogd.initd b/testing/inetutils-syslogd/inetutils-syslogd.initd
> index 6baad86..eb80b9c 100644
> --- a/testing/inetutils-syslogd/inetutils-syslogd.initd
> +++ b/testing/inetutils-syslogd/inetutils-syslogd.initd
> _at_@ -6,6 +6,7 @@
> name=syslogd
> daemon=/usr/sbin/$name
> config_file="/etc/syslog.conf"
> +pid_file=/var/run/syslog.pid

I would prefer:

pidfile=/var/runr/syslog.pid

that is the standard variablename that openrc knows. It would likely
also us to simply remove the start() and stop() functions.

Also, the patch would break building the apk since the checksum of
init.d script changed. run 'abuild checksum' for fix that.

You should also increase pkgrel otherwise will not the builders detect
that there is anything new to build.

Care to fix that and send a new patch?

Thanks!

-nc

>
> depend() {
> need clock hostname localmount
> _at_@ -23,7 +24,7 @@ start_pre() {
> start() {
> ebegin "Starting ${name}"
> start-stop-daemon --start --quiet \
> - --pidfile /var/run/${name}.pid \
> + --pidfile ${pid_file} \
> --exec ${daemon} -- ${SYSLOGD_OPTS}
> eend $?
> }
> _at_@ -31,20 +32,20 @@ start() {
> stop() {
> ebegin "Stopping ${name}"
> start-stop-daemon --stop --quiet \
> - --pidfile /var/run/$name.pid \
> + --pidfile ${pid_file} \
> --exec ${daemon}
> eend $?
> }
>
> reload() {
> - if [ ! -f "${PIDFILE}" ]; then
> - eerror "rsyslogd not running"
> + if [ ! -f "${pid_file}" ]; then
> + eerror "inetutils-syslogd not running"
> return 1
> fi
>
> ebegin "Re-opening intetutils-syslogd log files"
> start-stop-daemon --stop --signal HUP \
> - --pidfile /var/run/$name.pid
> + --pidfile ${pid_file}
> eend $?
> }
>
> diff --git a/testing/inetutils-syslogd/syslog.conf b/testing/inetutils-syslogd/syslog.conf
> index 27141bf..fb6b25e 100644
> --- a/testing/inetutils-syslogd/syslog.conf
> +++ b/testing/inetutils-syslogd/syslog.conf
> _at_@ -21,9 +21,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/news.crit
> +#news.err /var/log/news/news.err
> +#news.notice -/var/log/news/news.notice
>
> #
> # Some "catch-all" log files.



---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Fri Nov 22 2013 - 16:04:23 UTC