diff mbox

[01/10] skeleton/S40network: tweak for debian ifupdown

Message ID 1415969096-3032-2-git-send-email-gustavo@zacarias.com.ar
State Superseded
Headers show

Commit Message

Gustavo Zacarias Nov. 14, 2014, 12:44 p.m. UTC
Make the S40network script create the /run/network directory for the
debian variant of ifupdown which uses it as a lock directory.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 system/skeleton/etc/init.d/S40network | 3 +++
 1 file changed, 3 insertions(+)

Comments

Arnout Vandecappelle Nov. 14, 2014, 9:33 p.m. UTC | #1
On 14/11/14 13:44, Gustavo Zacarias wrote:
> Make the S40network script create the /run/network directory for the
> debian variant of ifupdown which uses it as a lock directory.
>
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
>  system/skeleton/etc/init.d/S40network | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/system/skeleton/etc/init.d/S40network
> b/system/skeleton/etc/init.d/S40network
> index e69e613..4317d14 100755
> --- a/system/skeleton/etc/init.d/S40network
> +++ b/system/skeleton/etc/init.d/S40network
> @@ -3,6 +3,9 @@
>  # Start the network....
>  #
>  
> +# Debian ifupdown needs the /run/network lock directory
> +[ -h /sbin/ifup ] || mkdir -p /run/network

 I think checking for a symlink is a pretty fragile way for distinguishing
between Debian and busybox ifupdown...

 Why not just create the directory unconditionally? People who care about the
4K tmpfs wastage will probably want to get rid of this script entirely...


 Regards,
 Arnout

> +
>  case "$1" in
>    start)
>       echo "Starting network..."
>
diff mbox

Patch

diff --git a/system/skeleton/etc/init.d/S40network b/system/skeleton/etc/init.d/S40network
index e69e613..4317d14 100755
--- a/system/skeleton/etc/init.d/S40network
+++ b/system/skeleton/etc/init.d/S40network
@@ -3,6 +3,9 @@ 
 # Start the network....
 #
 
+# Debian ifupdown needs the /run/network lock directory
+[ -h /sbin/ifup ] || mkdir -p /run/network
+
 case "$1" in
   start)
  	echo "Starting network..."