Mail archive
alpine-aports

Re: [alpine-aports] [PATCH] testing/metalog: new aport

From: Milan P. Stanić <mps_at_arvanta.net>
Date: Sun, 3 Mar 2019 09:44:53 +0100

On Wed, 2019-02-27 at 08:32, Natanael Copa wrote:
> On Fri, 22 Feb 2019 16:13:34 +0100
[...]
> > +# PID file
> > +PIDFILE="/var/run/metalog.pid"
>
> We should use /run instead of /var/run.
> http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s15.html

Fixed.
[...]
> > +start() {
> > + ebegin "Starting metalog"
> > + start-stop-daemon \
> > + --start --quiet --exec $command \
> > + -- ${METALOG_OPTS} -p "${PIDFILE}" -C "${CONFIGFILE}"
> > + eend $?
> > +}
> > +
> > +stop() {
> > + ebegin "Stopping metalog"
> > + start-stop-daemon \
> > + --stop --quiet \
> > + --pidfile "${PIDFILE}"
> > + eend $?
> > +}
>
> I think we can factor out start and stop functions by:
>
> change PIDFILE to pidfile
> use: command_args="$METALOG_OPTS -p $pidfile -C $CONFIGFILE"
>
> We may want check that $CONFIGFILE exists in a start_pre function too.
>
> I guess we could also just steal the gentoo script:
> https://gitweb.gentoo.org/repo/gentoo.git/tree/app-admin/metalog/files/metalog.initd-r1
 
Fixed, i.e. use stolen Gentoo init script.

I posted updated patch according to your suggestions
https://patchwork.alpinelinux.org/patch/4538/

Thanks for help

-- 
regards
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sun Mar 03 2019 - 09:44:53 UTC