summaryrefslogtreecommitdiffstats
path: root/loader/net.c
diff options
context:
space:
mode:
authorRadek Vykydal <rvykydal@redhat.com>2011-01-31 23:24:16 +0100
committerRadek Vykydal <rvykydal@redhat.com>2011-03-02 13:21:43 +0100
commit53b910b6d9e6b4d2830c36d90926228f2e8ca0cc (patch)
tree5a734528ee4b79a53f4de936764c2135c2c3e058 /loader/net.c
parent0f29e0f80a746e259ba2fc4a8139f04f2f7c3729 (diff)
downloadanaconda-53b910b6d9e6b4d2830c36d90926228f2e8ca0cc.tar.gz
anaconda-53b910b6d9e6b4d2830c36d90926228f2e8ca0cc.tar.xz
anaconda-53b910b6d9e6b4d2830c36d90926228f2e8ca0cc.zip
Activate all devices set by kickstart network --activate command
Port from rhel6-branch. Resolves: rhbz#638131
Diffstat (limited to 'loader/net.c')
-rw-r--r--loader/net.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/loader/net.c b/loader/net.c
index 22ed89215..98298987b 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -1887,7 +1887,6 @@ int chooseNetworkInterface(struct loaderData_s * loaderData) {
* kickstart install so that we can do things like grab the ks.cfg from
* the network */
int kickstartNetworkUp(struct loaderData_s * loaderData, iface_t * iface) {
- int rc, err;
if ((is_nm_connected() == TRUE) &&
(loaderData->netDev != NULL) && (loaderData->netDev_set == 1))
@@ -1895,6 +1894,13 @@ int kickstartNetworkUp(struct loaderData_s * loaderData, iface_t * iface) {
memset(iface, 0, sizeof(*iface));
+ return activateDevice(loaderData, iface);
+
+}
+
+int activateDevice(struct loaderData_s * loaderData, iface_t * iface) {
+ int rc;
+
do {
do {
/* this is smart and does the right thing based on whether or not
@@ -1930,12 +1936,13 @@ int kickstartNetworkUp(struct loaderData_s * loaderData, iface_t * iface) {
loaderData->method);
if (rc == LOADER_ERROR) {
- logMessage(ERROR, "unable to setup networking");
+ logMessage(ERROR, "unable to activate device %s", iface->device);
return -1;
} else if (rc == LOADER_BACK) {
/* Going back to the interface selection screen, so unset anything
* we set before attempting to bring the incorrect interface up.
*/
+ logMessage(ERROR, "unable to activate device %s", iface->device);
if ((rc = writeDisabledNetInfo()) != 0) {
logMessage(ERROR, "writeDisabledNetInfo failure (%s): %d",
__func__, rc);
@@ -1951,22 +1958,6 @@ int kickstartNetworkUp(struct loaderData_s * loaderData, iface_t * iface) {
} else {
break;
}
-
- err = writeEnabledNetInfo(iface);
- if (err) {
- logMessage(ERROR,
- "failed to write %s data for %s (%d)",
- SYSCONFIG_PATH, iface->device, err);
- return -1;
- }
-
- err = get_connection(iface);
- newtPopWindow();
-
- if (err) {
- logMessage(ERROR, "failed to start NetworkManager (%d)", err);
- return -1;
- }
} while (1);
return 0;