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

Re: [PATCH 2/4] Read in network settings correctly, as configured by linuxrc.s390

Hash: SHA1

On Tue, 4 May 2010, Ales Kozumplik wrote:

On 05/04/2010 06:46 AM, David Cantrell wrote:
This patch fixes some old fallout from the move to NetworkManager.
Without this patch, loaderData never gets fully populated with the
network settings from linuxrc.s390.  Some backstory:

Before the move to NM, linuxrc.s390 wrote out /tmp/netinfo and loader
read that file it to populate loaderData.  By reading in these values,
loader would not have to prompt the user again for the same network

With the move to NM, this function was changed to read the only ifcfg
file in /etc/sysconfig/network-scripts and gather settings.  We cannot
always assume one file in /etc/sysconfig/network-scripts, so this patch
addresses that problem and makes some other improvements.

1) Read /etc/sysconfig/network-scripts/ifcfg-DEVICE where DEVICE is the
    value returned by getenv("DEVICE").
2) Remove old parsing code and use g_file_get_contents(), g_strsplit(),
    and g_shell_unquote().

Tested on s390x, which is the only platform that would call this
function, and it successfully elmininates the double prompting of
network settings.

Looks good. I assume the other architectures will bail out of the function quickly because they won't see getenv("DEVICE") set, yes?


- -- David Cantrell <dcantrell redhat com>
Red Hat / Honolulu, HI

Version: GnuPG v1.4.10 (GNU/Linux)


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