Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/netplug: init script create needed lock directory
@ 2017-09-05  8:39 Julien Corjon
  2017-09-05  9:01 ` Yann E. MORIN
  2017-09-05  9:54 ` [Buildroot] [PATCH v2] " Julien Corjon
  0 siblings, 2 replies; 6+ messages in thread
From: Julien Corjon @ 2017-09-05  8:39 UTC (permalink / raw)
  To: buildroot

Init script use /var/lock/subsys/netplugd but directory
/var/lock/subsys can be missing.

Signed-off-by: Julien Corjon <corjon.j@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
+
 # Source function library.
 if [ -f /etc/init.d/functions ]; then
 	. /etc/init.d/functions
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] package/netplug: init script create needed lock directory
  2017-09-05  8:39 [Buildroot] [PATCH] package/netplug: init script create needed lock directory Julien Corjon
@ 2017-09-05  9:01 ` Yann E. MORIN
  2017-09-05  9:54 ` [Buildroot] [PATCH v2] " Julien Corjon
  1 sibling, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2017-09-05  9:01 UTC (permalink / raw)
  To: buildroot

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@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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2] package/netplug: init script create needed lock directory
  2017-09-05  8:39 [Buildroot] [PATCH] package/netplug: init script create needed lock directory Julien Corjon
  2017-09-05  9:01 ` Yann E. MORIN
@ 2017-09-05  9:54 ` Julien Corjon
  2017-09-05 19:30   ` Thomas Petazzoni
                     ` (2 more replies)
  1 sibling, 3 replies; 6+ messages in thread
From: Julien Corjon @ 2017-09-05  9:54 UTC (permalink / raw)
  To: buildroot

Init script use /var/lock/subsys/netplugd but directory
/var/lock/subsys can be missing.

Signed-off-by: Julien Corjon <corjon.j@ecagroup.com>
---

v2:
- dont test already existing directory

 package/netplug/S29netplug | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/netplug/S29netplug b/package/netplug/S29netplug
index 88f933d556..d3df9ddff5 100755
--- a/package/netplug/S29netplug
+++ b/package/netplug/S29netplug
@@ -11,6 +11,9 @@
 
 # Copyright 2003 Key Research, Inc.
 
+# Create needed directories
+mkdir -p /var/lock/subsys
+
 # Source function library.
 if [ -f /etc/init.d/functions ]; then
 	. /etc/init.d/functions
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2] package/netplug: init script create needed lock directory
  2017-09-05  9:54 ` [Buildroot] [PATCH v2] " Julien Corjon
@ 2017-09-05 19:30   ` Thomas Petazzoni
  2017-09-06 12:52   ` Peter Korsgaard
  2017-10-16 21:46   ` Peter Korsgaard
  2 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2017-09-05 19:30 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue,  5 Sep 2017 11:54:56 +0200, Julien Corjon wrote:
> Init script use /var/lock/subsys/netplugd but directory
> /var/lock/subsys can be missing.
> 
> Signed-off-by: Julien Corjon <corjon.j@ecagroup.com>
> ---

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2] package/netplug: init script create needed lock directory
  2017-09-05  9:54 ` [Buildroot] [PATCH v2] " Julien Corjon
  2017-09-05 19:30   ` Thomas Petazzoni
@ 2017-09-06 12:52   ` Peter Korsgaard
  2017-10-16 21:46   ` Peter Korsgaard
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2017-09-06 12:52 UTC (permalink / raw)
  To: buildroot

>>>>> "Julien" == Julien Corjon <corjon.j@ecagroup.com> writes:

 > Init script use /var/lock/subsys/netplugd but directory
 > /var/lock/subsys can be missing.

 > Signed-off-by: Julien Corjon <corjon.j@ecagroup.com>
 > ---

 > v2:
 > - dont test already existing directory

Committed to 2017.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2] package/netplug: init script create needed lock directory
  2017-09-05  9:54 ` [Buildroot] [PATCH v2] " Julien Corjon
  2017-09-05 19:30   ` Thomas Petazzoni
  2017-09-06 12:52   ` Peter Korsgaard
@ 2017-10-16 21:46   ` Peter Korsgaard
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2017-10-16 21:46 UTC (permalink / raw)
  To: buildroot

>>>>> "Julien" == Julien Corjon <corjon.j@ecagroup.com> writes:

 > Init script use /var/lock/subsys/netplugd but directory
 > /var/lock/subsys can be missing.

 > Signed-off-by: Julien Corjon <corjon.j@ecagroup.com>
 > ---

 > v2:
 > - dont test already existing directory

Committed to 2017.08.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-16 21:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-05  8:39 [Buildroot] [PATCH] package/netplug: init script create needed lock directory Julien Corjon
2017-09-05  9:01 ` Yann E. MORIN
2017-09-05  9:54 ` [Buildroot] [PATCH v2] " Julien Corjon
2017-09-05 19:30   ` Thomas Petazzoni
2017-09-06 12:52   ` Peter Korsgaard
2017-10-16 21:46   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox