X-Original-To: alpine-aports@lists.alpinelinux.org Received: from fx.arvanta.net (static-213-198-238-194.adsl.eunet.rs [213.198.238.194]) by lists.alpinelinux.org (Postfix) with ESMTP id 5D64FF84D34 for ; Sun, 3 Mar 2019 08:44:54 +0000 (UTC) Received: from arya.arvanta.net (arya.arvanta.net [10.5.1.6]) by fx.arvanta.net (Postfix) with ESMTP id 3708E5BA5 for ; Sun, 3 Mar 2019 09:44:53 +0100 (CET) Date: Sun, 3 Mar 2019 09:44:53 +0100 From: Milan =?utf-8?Q?P=2E_Stani=C4=87?= To: alpine-aports@lists.alpinelinux.org Subject: Re: [alpine-aports] [PATCH] testing/metalog: new aport Message-ID: <20190303084452.GA27286@arya.arvanta.net> References: <20190222151334.25126-1-mps@arvanta.net> <20190227083218.5c8c9ada@ncopa-desktop.copa.dup.pw> X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190227083218.5c8c9ada@ncopa-desktop.copa.dup.pw> User-Agent: Mutt/1.11.2 (2019-01-07) 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@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---