X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from localhost (unknown [187.40.228.12]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nc@alpinelinux.org) by mail.alpinelinux.org (Postfix) with ESMTPSA id 8F246DC0FC4; Mon, 26 Mar 2012 18:47:19 +0000 (UTC) Date: Mon, 26 Mar 2012 20:47:27 +0200 From: Natanael Copa To: Der Tiger Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] [Patch] mini_httpd: crash on startup Message-ID: <20120326204727.0e307d6a@alpinelinux.org> In-Reply-To: <4F6E326B.3070401@arcor.de> References: <4F6E326B.3070401@arcor.de> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; i686-pc-linux-gnu) X-Mailinglist: alpine-devel 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-Transfer-Encoding: 7bit On Sat, 24 Mar 2012 21:45:31 +0100 Der Tiger wrote: > Hi, > > mini_httpd is quite picky about the availability of paths to the log > and pid files. If those folders do not exist, e.g. because they point > to an after the system boot empty tmpfs, mini_httpd (as such ACF) > will crash. Hi, thanks for the feedback. > > The patch below ensures the folders are available. Please, consider > integrating it. I get this error when tryin apply it: fatal: cannot convert from ISO-8859-15 to UTF-8 > > Regards, Tiger > > --- /etc/init.d/mini_httpd.orig > +++ /etc/init.d/mini_httpd > @@ -6,0 +7 @@ > +logfile=/var/log/mini_httpd/${SVCNAME}.log > @@ -14,0 +16,2 @@ > + mkdir -p "$(echo $pidfile | sed 's|/[^/]*$||')" > + mkdir -p "$(echo $logfile | sed 's|/[^/]*$||')" openrc has a tool for this. checkpath. how about something like: checkpath -d ${pidfile%/*} checkpath -d ${logfile%/*} For documentation: apk add openrc-doc man runscript We should add how to create dirs for pidfiles to the wiki. And no, we cannot expect the package create subdirs under /var/run (or /run) because /var/run could be a tmpfs mount. > @@ -17 +20 @@ > - ${MINI_HTTPD_OPTS:--C /etc/${SVCNAME}.conf -l > /var/log/mini_httpd/${SVCNAME}.log} > + ${MINI_HTTPD_OPTS:--C /etc/${SVCNAME}.conf -l $logfile} > > > > --- > Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org > Help: alpine-devel+help@lists.alpinelinux.org > --- > --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---