Skip to contentSkip to conversation

package/netplug: init script create needed lock directory

PATCH Superseded Julien Corjon 4 participants 6 messages Sep 5, 2017 – Oct 16, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/netplug: init script create needed lock directory

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

---
 package/netplug/S29netplug | 3 +++
 1 file changed, 3 insertions(+)
package/netplug/S29netplug +3 -0
index 88f933d556..fe63c1b79a 100755
@@ -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
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 package/netplug: init script create needed lock directory

Julien, All,

On 2017-09-05 10:39 +0200, Julien Corjon spake thusly:

Quoted 13 lines

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

---
 package/netplug/S29netplug | 3 +++
 1 file changed, 3 insertions(+)
package/netplug/S29netplug +0 -0
index 88f933d556..fe63c1b79a 100755

package/netplug/S29netplug line 15

Quoted 5 lines
package/netplug/S29netplug +2 -0
@@ -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.

Quoted 10 lines
package/netplug/S29netplug +0 -0
 # Source function library.
 if [ -f /etc/init.d/functions ]; then
 	. /etc/init.d/functions
Signature · 6 lines
2.11.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH v2 1/1 package/netplug: init script create needed lock directory

In reply to Julien Corjon

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

---

v2:
- dont test already existing directory

 package/netplug/S29netplug | 3 +++
 1 file changed, 3 insertions(+)
package/netplug/S29netplug +3 -0
index 88f933d556..d3df9ddff5 100755
@@ -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
Signature · 1 line
2.11.0
#3 lore raw

PATCH v2 1/1 package/netplug: init script create needed lock directory

Hello,

Quoted 5 lines · Julien Corjon

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

---

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH v2 1/1 package/netplug: init script create needed lock directory

In reply to Julien Corjon
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Julien" == Julien Corjon <[email protected]> writes:

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

---

v2:
- dont test already existing directory

Committed to 2017.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH v2 1/1 package/netplug: init script create needed lock directory

In reply to Julien Corjon
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Julien" == Julien Corjon <[email protected]> writes:

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

---

v2:
- dont test already existing directory

Committed to 2017.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard