summaryrefslogtreecommitdiffstats
path: root/loader/net.c
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-03-01 07:15:22 +0000
committerBill Nottingham <notting@redhat.com>2001-03-01 07:15:22 +0000
commite3093a9427f6dff9e4762af538f9a02c32ff4c0b (patch)
tree676b079b072bba347fddb6ab000904cb1030e9fb /loader/net.c
parent8b988957d444db54b5aae775047c817b79b735e9 (diff)
downloadanaconda-e3093a9427f6dff9e4762af538f9a02c32ff4c0b.tar.gz
anaconda-e3093a9427f6dff9e4762af538f9a02c32ff4c0b.tar.xz
anaconda-e3093a9427f6dff9e4762af538f9a02c32ff4c0b.zip
netconfig fixesr0-8-11
- actually use the device passed on the command line if they select DHCP - don't bring the interface up - but still write whatever files we can
Diffstat (limited to 'loader/net.c')
-rw-r--r--loader/net.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/loader/net.c b/loader/net.c
index 2d3a7bf9e..d1bdff79b 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -66,7 +66,7 @@ typedef int int32;
#ifdef __STANDALONE__
static FILE * logfile = NULL;
-#define FL_TESTING(foo) 0
+#define FL_TESTING(foo) 1
void logMessage(const char * s, ...) {
va_list args;
@@ -419,6 +419,9 @@ int readNetConfig(char * device, struct networkDeviceConfig * cfg, int flags) {
if (!chptr) {
newCfg.isDynamic = 1;
+#ifdef __STANDALONE__
+ i = 2;
+#else
if (!(newCfg.dev.set & PUMP_NETINFO_HAS_DNS)) {
logMessage("pump worked, but didn't return a DNS server");
i = getDnsServers(&newCfg);
@@ -426,6 +429,7 @@ int readNetConfig(char * device, struct networkDeviceConfig * cfg, int flags) {
} else {
i = 2;
}
+#endif
} else {
logMessage("pump told us: %s", chptr);
i = 0;
@@ -433,6 +437,9 @@ int readNetConfig(char * device, struct networkDeviceConfig * cfg, int flags) {
}
} while (i != 2);
+#ifdef __STANDALONE__
+ if (!newCfg.isDynamic)
+#endif
cfg->dev = newCfg.dev;
cfg->isDynamic = newCfg.isDynamic;
@@ -460,6 +467,9 @@ int readNetConfig(char * device, struct networkDeviceConfig * cfg, int flags) {
writeResolvConf(cfg);
}
+#ifdef __STANDALONE__
+ writeResolvConf(cfg);
+#endif
return 0;
}
@@ -839,6 +849,7 @@ int main(int argc, const char **argv) {
exit(0);
}
if (!device) device="eth0";
+ strncpy(netDev->dev.device,device,10);
if (readNetConfig(device,netDev,0) != LOADER_BACK) {
snprintf(path,256,"/etc/sysconfig/network-scripts/ifcfg-%s",device);
writeNetInfo(path,netDev, NULL);