Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
playground
>
dracut
> 0216-network-parse-ip-opts.sh-fix-ifname-for-ibft-with-al.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0216-network-parse-ip-opts.sh-fix-ifname-for-ibft-with-al.patch of Package dracut
From a0ea3ac575676a1baca326c6938edb6cf94d3918 Mon Sep 17 00:00:00 2001 From: Harald Hoyer <harald@redhat.com> Date: Tue, 26 Apr 2011 23:22:41 +0200 Subject: [PATCH] network/parse-ip-opts.sh: fix ifname for ibft with all args --- modules.d/40network/parse-ip-opts.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh index 7828a80..9f6d9f3 100755 --- a/modules.d/40network/parse-ip-opts.sh +++ b/modules.d/40network/parse-ip-opts.sh @@ -1,4 +1,6 @@ #!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh # # Format: # ip=[dhcp|on|any] @@ -59,16 +61,19 @@ if [ "ibft" = "$(getarg ip=)" ]; then [ -e ${iface}/mac ] || continue ifname_mac=$(read a < ${iface}/mac; echo $a) [ -z "$ifname_mac" ] && continue + unset dev for ifname in $(getargs ifname=); do if strstr "$ifname" "$ifname_mac"; then dev=${ifname%%:*} - else - ifname_if=ibft$num - num=$(( $num + 1 )) - echo "ifname=$ifname_if:$ifname_mac" - dev=$ifname_if - fi + break + fi done + if [ -z "$dev" ]; then + ifname_if=ibft$num + num=$(( $num + 1 )) + echo "ifname=$ifname_if:$ifname_mac" + dev=$ifname_if + fi dhcp=$(read a < ${iface}/dhcp; echo $a) if [ -n "$dhcp" ]; then -- 1.8.3.1