summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2000-04-24 18:26:49 +0000
committerMike Fulbright <msf@redhat.com>2000-04-24 18:26:49 +0000
commita9676db2b152a6a5c302b475107d6d61e6aaa362 (patch)
tree1f2d2a28610ae93e3c072426c873ad244183e0f7
parenta402692ef9188ee2c9e997eb8f11582d240da615 (diff)
downloadanaconda-a9676db2b152a6a5c302b475107d6d61e6aaa362.tar.gz
anaconda-a9676db2b152a6a5c302b475107d6d61e6aaa362.tar.xz
anaconda-a9676db2b152a6a5c302b475107d6d61e6aaa362.zip
Fix to allow kickstart specified hostname to override
-rw-r--r--loader/net.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/loader/net.c b/loader/net.c
index 65c43eaa5..61f2597a6 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -498,6 +498,7 @@ int kickstartNetwork(char * device, struct networkDeviceConfig * netDev,
int ksArgc;
int netSet, rc;
char * arg, * chptr;
+ char * kshostname=NULL;
poptContext optCon;
struct in_addr * parseAddress;
int noDns = 0;
@@ -548,10 +549,12 @@ int kickstartNetwork(char * device, struct networkDeviceConfig * netDev,
netSet = PUMP_INTFINFO_HAS_NETMASK;
break;
- /* ignore hostname for now, just don't barf on it! */
- case 'h':
- parseAddress = NULL;
- break;
+ case 'h':
+ if (kshostname)
+ free(kshostname);
+ kshostname = strdup(arg);
+ logMessage("netDev->dev.hostname = %s", kshostname);
+ break;
}
if (parseAddress && !inet_aton(arg, parseAddress)) {
@@ -605,6 +608,12 @@ int kickstartNetwork(char * device, struct networkDeviceConfig * netDev,
logMessage("nodns is %d", noDns);
+ if (kshostname) {
+ logMessage("setting ks specified hostname of %s", kshostname);
+ netDev->dev.hostname=strdup(kshostname);
+ netDev->dev.set |= PUMP_NETINFO_HAS_HOSTNAME;
+ }
+
if (!noDns)
findHostAndDomain(netDev, flags);