Patches for aports can be sent to this list

2 2

[alpine-aports] [PATCH] main/nginx: pre-install to create /run/nginx

Joe Borg
Details
Message ID
<20161025074054.6084-1-cyborg101010@gmail.com>
Sender timestamp
1477381254
DKIM signature
missing
Download raw message
Patch: +4 -0
Nginx throws an error, the first time you run it, because the /run/nginx
directory does not exist.  Have added to the pre-install script to create this,
if it doesn't already exist.

http://bugs.alpinelinux.org/issues/6380
---
 main/nginx/nginx.pre-install | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/main/nginx/nginx.pre-install b/main/nginx/nginx.pre-install
index ae5b685..e30aa2f 100644
--- a/main/nginx/nginx.pre-install
+++ b/main/nginx/nginx.pre-install
@@ -5,4 +5,8 @@ addgroup -S nginx 2>/dev/null
 adduser -S -D -H -h /var/lib/nginx -s /sbin/nologin -G nginx -g nginx nginx 2>/dev/null
 addgroup nginx www-data 2>/dev/null
 
+if [ ! -d /run/nginx ]; then
+    mkdir /run/nginx
+fi
+
 exit 0
-- 
2.10.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Timo Teras
Details
Message ID
<20161025131612.1c9cb9a4@vostro.util.wtbts.net>
In-Reply-To
<20161025074054.6084-1-cyborg101010@gmail.com> (view parent)
Sender timestamp
1477390572
DKIM signature
missing
Download raw message
On Tue, 25 Oct 2016 08:40:54 +0100
Joe Borg <cyborg101010@gmail.com> wrote:

> Nginx throws an error, the first time you run it, because
> the /run/nginx directory does not exist.  Have added to the
> pre-install script to create this, if it doesn't already exist.
> 
> http://bugs.alpinelinux.org/issues/6380
> ---
>  main/nginx/nginx.pre-install | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/main/nginx/nginx.pre-install
> b/main/nginx/nginx.pre-install index ae5b685..e30aa2f 100644
> --- a/main/nginx/nginx.pre-install
> +++ b/main/nginx/nginx.pre-install
> @@ -5,4 +5,8 @@ addgroup -S nginx 2>/dev/null
>  adduser -S -D -H -h /var/lib/nginx -s /sbin/nologin -G nginx -g
> nginx nginx 2>/dev/null addgroup nginx www-data 2>/dev/null
>  
> +if [ ! -d /run/nginx ]; then
> +    mkdir /run/nginx
> +fi
> +
>  exit 0


Not ok.

$ mount|grep /run
tmpfs on /run type tmpfs (rw,nodev,relatime,size=768268k,mode=755)

That is /run is a tmpfs mount and gets recreated on reboot. This should
be done in the init.d script.

Thanks.


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Natanael Copa
Details
Message ID
<20161025220459.6088a897@ncopa-desktop.copa.dup.pw>
In-Reply-To
<20161025074054.6084-1-cyborg101010@gmail.com> (view parent)
Sender timestamp
1477425899
DKIM signature
missing
Download raw message
On Tue, 25 Oct 2016 08:40:54 +0100
Joe Borg <cyborg101010@gmail.com> wrote:

> Nginx throws an error, the first time you run it, because the /run/nginx
> directory does not exist.  Have added to the pre-install script to create this,
> if it doesn't already exist.
> 
> http://bugs.alpinelinux.org/issues/6380
> ---
>  main/nginx/nginx.pre-install | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/main/nginx/nginx.pre-install b/main/nginx/nginx.pre-install
> index ae5b685..e30aa2f 100644
> --- a/main/nginx/nginx.pre-install
> +++ b/main/nginx/nginx.pre-install
> @@ -5,4 +5,8 @@ addgroup -S nginx 2>/dev/null
>  adduser -S -D -H -h /var/lib/nginx -s /sbin/nologin -G nginx -g nginx nginx 2>/dev/null
>  addgroup nginx www-data 2>/dev/null
>  
> +if [ ! -d /run/nginx ]; then
> +    mkdir /run/nginx
> +fi
> +
>  exit 0

I think it needs to be done from the startup script. /run is normally a
tmpfs so the dir will be gone next reboot. This means that we cannot
rely on something that creates the dir at package install time.


-nc


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---