Correctly pass netdev name from linuxrc.s390 to loader (#595382)
Loader has 3 ways to configure the network:
1) interactive user input
2) boot parameters
3) readNetInfo
Option 3 is used to transfer the configuration of the already configured
network of linuxrc.s390. Linuxrc.s390 has to configure the network early
since the default terminals on s390 provide line mode but no full screen.
The user then logs in over ssh to provide a full screen terminal in which
loader can be executed. Since linuxrc already did the network config,
we want to skip interactive user input in loader. Hence, 3 replaces 1 and 2
on s390.
Before 0d5f432a39178f78754698e33a89905440584e4c, loader's readNetinfo
iterated over all existing ifcfg files, which is only fine for s390
where linuxrc currently only ever configures at most one network device.
Since readNetInfo is called for all platforms there could maybe exist
more than one ifcfg file so we need a way for linuxrc to tell loader the
name of the specific configured device.
Linuxrc.s390 has 3 ways to activate loader:
1) ssh login as user install, which has /sbin/loader as login shell
2) ssh login as user root (/bin/bash) and executing loader manually
3) boot option RUNKS=1
Passing exported environment variables only works for 3 where loader
is a child of linuxrc. 2 only worked by accident since linuxrc wrote
the content of /tmp/install.cfg into /etc/profile so root could see it.
However, in the general and often used case 1 there is neither an ancestor
relationship between linuxrc and loader nor a shell involved.
Therefore, introduce a new file /tmp/s390net to pass the name to loader.
This works the same for all three cases.
Since QETHPARM and CHANDEV are no longer used, we can get rid of
the old /tmp/install.cfg entirely.
---
booty/bootloaderInfo.py | 15 ---------------
loader/linuxrc.s390 | 45 +++++++--------------------------------------
loader/loader.c | 40 ++++++++++++++++++++++++++++++++++------
3 files changed, 41 insertions(+), 59 deletions(-)
diff --git a/booty/bootloaderInfo.py b/booty/bootloaderInfo.py
index d019edf..a0a7b4d 100644
--- a/booty/bootloaderInfo.py
+++ b/booty/bootloaderInfo.py
@@ -172,26 +172,11 @@ class KernelArguments:
/* make sure everything is NULL before we begin copying info */
loaderData->ipv4 = NULL;
@@ -1485,7 +1513,7 @@ static char *doLoaderMain(struct loaderData_s *loaderData,
logMessage(INFO, "going to do getNetConfig");
- /* s390 provides all config info by way of the CMS conf file */
+ /* s390 provides all config info by way of linuxrc.s390 */
if (FL_HAVE_CMSCONF(flags)) {
loaderData->ipinfo_set = 1;
#ifdef ENABLE_IPV6
--
1.7.0.4
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
06-02-2010, 06:45 PM
Steffen Maier
Correctly pass netdev name from linuxrc.s390 to loader (#595382)
Pass configured network device on s390 to loader via /tmp/s390net rather
than the DEVICE environment variable. Using the environment variable only
works when loader is the child process of /sbin/init, which only happens
with RUNKS=1. Other installs on s390 invoke loader as the ssh login shell,
so they never see the DEVICE environment variable.
---
booty/bootloaderInfo.py | 15 ---------------
loader/linuxrc.s390 | 45 +++++++--------------------------------------
loader/loader.c | 39 +++++++++++++++++++++++++++++++++------
3 files changed, 40 insertions(+), 59 deletions(-)
diff --git a/booty/bootloaderInfo.py b/booty/bootloaderInfo.py
index d019edf..a0a7b4d 100644
--- a/booty/bootloaderInfo.py
+++ b/booty/bootloaderInfo.py
@@ -172,26 +172,11 @@ class KernelArguments:
/* make sure everything is NULL before we begin copying info */
loaderData->ipv4 = NULL;
@@ -1495,7 +1522,7 @@ static char *doLoaderMain(struct loaderData_s *loaderData,
logMessage(INFO, "going to do getNetConfig");
- /* s390 provides all config info by way of the CMS conf file */
+ /* s390 provides all config info by way of linuxrc.s390 */
if (FL_HAVE_CMSCONF(flags)) {
loaderData->ipinfo_set = 1;
#ifdef ENABLE_IPV6
--
1.7.0.4
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list