mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Will Woods <wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] add anaconda-style option parsing to ip_to_var
Date: Tue, 29 May 2012 11:41:28 +0200	[thread overview]
Message-ID: <4FC499C8.1080408@redhat.com> (raw)
In-Reply-To: <1337725867-9922-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Am 23.05.2012 00:31, schrieb Will Woods:
> Anaconda used arguments of the form:
> 
>   ip=<ip> gateway=<gw> netmask=<nm>
> 
> for static IP configuration. So if we get a value for "ip" that's an IP
> address, look for gateway= and netmask= and related args to fill in the
> ip config vars.
> ---
>  modules.d/40network/net-lib.sh |   14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
> index d6adda9..75ad5e3 100644
> --- a/modules.d/40network/net-lib.sh
> +++ b/modules.d/40network/net-lib.sh
> @@ -266,4 +266,18 @@ ip_to_var() {
>          4)  dev=$1; autoconf=$2; mtu=$3; macaddr=$4 ;;
>          *)  ip=$1; srv=$2; gw=$3; mask=$4; hostname=$5; dev=$6; autoconf=$7; mtu=$8; macaddr=$9 ;;
>      esac
> +    # anaconda-style argument cluster
> +    if strstr "$autoconf" "*.*.*.*"; then
> +        ip="$autoconf"
> +        gw=$(getarg gateway=)
> +        mask=$(getarg netmask=)
> +        hostname=$(getarg hostname=)
> +        dev=$(getarg ksdevice=)
> +        autoconf="none"
> +        mtu=$(getarg mtu=)
> +        case "$dev" in
> +            # ignore fancy values for ksdevice=XXX
> +            link|bootif|BOOTIF|ibft|*:*:*:*:*:*) dev="" ;;
> +        esac
> +    fi
>  }

pushed

      parent reply	other threads:[~2012-05-29  9:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22 22:31 [PATCH] add anaconda-style option parsing to ip_to_var Will Woods
     [not found] ` <1337725867-9922-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-05-29  9:41   ` Harald Hoyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FC499C8.1080408@redhat.com \
    --to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox