mkinitrd unification across distributions
 help / color / mirror / Atom feed
* [PATCH] 40network/ifup.sh: do_static() and do_ipv6auto return 0 if no errors.
@ 2012-10-18  8:43 WANG Chao
       [not found] ` <1350549808-8891-1-git-send-email-chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: WANG Chao @ 2012-10-18  8:43 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA, harald-H+wXaHxf7aLQT0dZR+AlfA,
	dyoung-H+wXaHxf7aLQT0dZR+AlfA

Commit a0be1ed removes some lines from do_static() and do_ipv6auto().

When $hostname is empty, do_static() and do_ipv6auto() will return 1
and fails to run setup_net at the last of ifup.sh

Signed-off-by: WANG Chao <chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 modules.d/40network/ifup.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 95289c9..db233de 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -88,6 +88,8 @@ do_ipv6auto() {
     wait_for_if_up $netif
 
     [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
+
+    return 0
 }
 
 # Handle static ip configuration
@@ -108,6 +110,8 @@ do_static() {
 
     [ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw
     [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
+
+    return 0
 }
 
 # loopback is always handled the same way
-- 
1.7.12.2

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

* Re: [PATCH] 40network/ifup.sh: do_static() and do_ipv6auto return 0 if no errors.
       [not found] ` <1350549808-8891-1-git-send-email-chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2012-10-19 11:00   ` Harald Hoyer
  0 siblings, 0 replies; 2+ messages in thread
From: Harald Hoyer @ 2012-10-19 11:00 UTC (permalink / raw)
  To: WANG Chao
  Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, harald-H+wXaHxf7aLQT0dZR+AlfA,
	dyoung-H+wXaHxf7aLQT0dZR+AlfA

Am 18.10.2012 10:43, schrieb WANG Chao:
> Commit a0be1ed removes some lines from do_static() and do_ipv6auto().
> 
> When $hostname is empty, do_static() and do_ipv6auto() will return 1
> and fails to run setup_net at the last of ifup.sh
> 
> Signed-off-by: WANG Chao <chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  modules.d/40network/ifup.sh | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
> index 95289c9..db233de 100755
> --- a/modules.d/40network/ifup.sh
> +++ b/modules.d/40network/ifup.sh
> @@ -88,6 +88,8 @@ do_ipv6auto() {
>      wait_for_if_up $netif
>  
>      [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
> +
> +    return 0
>  }
>  
>  # Handle static ip configuration
> @@ -108,6 +110,8 @@ do_static() {
>  
>      [ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw
>      [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
> +
> +    return 0
>  }
>  
>  # loopback is always handled the same way
> 

https://admin.fedoraproject.org/updates/dracut-024-5.git20121019.fc18

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

end of thread, other threads:[~2012-10-19 11:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-18  8:43 [PATCH] 40network/ifup.sh: do_static() and do_ipv6auto return 0 if no errors WANG Chao
     [not found] ` <1350549808-8891-1-git-send-email-chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-10-19 11:00   ` Harald Hoyer

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