[Buildroot] [PATCH] package/netplug: init script create needed lock directory
Yann E. MORIN
yann.morin.1998 at free.fr
Tue Sep 5 09:01:17 UTC 2017
Julien, All,
On 2017-09-05 10:39 +0200, Julien Corjon spake thusly:
> Init script use /var/lock/subsys/netplugd but directory
> /var/lock/subsys can be missing.
>
> Signed-off-by: Julien Corjon <corjon.j at ecagroup.com>
> ---
> package/netplug/S29netplug | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/package/netplug/S29netplug b/package/netplug/S29netplug
> index 88f933d556..fe63c1b79a 100755
> --- a/package/netplug/S29netplug
> +++ b/package/netplug/S29netplug
> @@ -11,6 +11,9 @@
>
> # Copyright 2003 Key Research, Inc.
>
> +# Create needed directories
> +[ -d /var/lock/subsys ] || mkdir -p /var/lock/subsys
mkdir -p will only create what is needed, so if the directory already exists,
it will do nothing, and will not whine either. So, don't test, just mkdir.
Regards,
Yann E. MORIN.
> # Source function library.
> if [ -f /etc/init.d/functions ]; then
> . /etc/init.d/functions
> --
> 2.11.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
More information about the buildroot
mailing list