~alpine/devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

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

Details
Message ID
<1385061015-12542-1-git-send-email-developer@it-offshore.co.uk>
Sender timestamp
1385061015
DKIM signature
missing
Download raw message
Patch: +9 -8
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
@@ -6,6 +6,7 @@
name=syslogd
daemon=/usr/sbin/$name
config_file="/etc/syslog.conf"
pid_file=/var/run/syslog.pid

depend() {
	need clock hostname localmount
@@ -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 $?
}
@@ -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
@@ -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.
-- 
1.8.4.3



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20131122160423.4eb26275@ncopa-desktop.alpinelinux.org>
In-Reply-To
<1385061015-12542-1-git-send-email-developer@it-offshore.co.uk> (view parent)
Sender timestamp
1385132663
DKIM signature
missing
Download raw message
On Thu, 21 Nov 2013 19:10:15 +0000
IT Offshore <developer@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
> @@ -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
> @@ -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 $?
>  }
> @@ -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
> @@ -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@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)