Re: [PATCH 3/4] 40network: always start netroot in ifup.sh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23.03.2015 17:12, Thomas Renninger wrote:
> From: Hannes Reinecke <hare@xxxxxxx>
> 
> It's totally irrelevant how the network is configured when
> trying to setup netroot. It only matters if it could be
> configured at all.
> So change the logic the check for correct network setup
> and then start netroot.
> 
> References: bnc#881235
> 
> Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
> Signed-off-by: Thomas Renninger <trenn@xxxxxxx>
> ---
>  modules.d/40network/ifup.sh | 22 ++++++++--------------
>  1 file changed, 8 insertions(+), 14 deletions(-)
> 
> diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
> index de518b6..9af5474 100755
> --- a/modules.d/40network/ifup.sh
> +++ b/modules.d/40network/ifup.sh
> @@ -338,21 +338,15 @@ for p in $(getargs ip=); do
>          esac
>      done
>  
> -    > /tmp/net.${netif}.up
> +    if [ $? -eq 0 ]; then
> +        > /tmp/net.${netif}.up
>  
> -    case $autoconf in
> -        dhcp|on|any|dhcp6)
> -            ;;
> -        *)
> -            if [ $? -eq 0 ]; then
> -                setup_net $netif
> -                source_hook initqueue/online $netif
> -                if [ -z "$manualup" ]; then
> -                    /sbin/netroot $netif
> -                fi
> -            fi
> -            ;;
> -    esac
> +        setup_net $netif
> +        source_hook initqueue/online $netif
> +        if [ -z "$manualup" ]; then
> +            /sbin/netroot $netif
> +        fi
> +    fi
>  
>      exit 0
>  done
> 

Well, for dhcp, the dhclient-script.sh adds an initqueue script
setup_net_$netif.sh, which does:

. /lib/net-lib.sh
setup_net $netif
source_hook initqueue/online $netif
/sbin/netroot $netif


--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux