]>
Commit | Line | Data |
---|---|---|
5ac51b5e PG |
1 | --- ./dhcpconfig.c.org3 Mon Jan 6 12:36:42 2003 |
2 | +++ ./dhcpconfig.c Mon Jan 6 12:39:21 2003 | |
3 | @@ -381,18 +381,14 @@ | |
9c0d8242 | 4 | * because the resolver won't notice the change in resolv.conf */ |
5 | (void)res_init(); | |
6 | } | |
7 | - if ( ReplNISConf ) | |
8 | + if ( ReplNISConf && DhcpOptions.len[nisDomainName] ) | |
9 | { | |
10 | yp_renamed=1+rename(NIS_CONF,""NIS_CONF".sv"); | |
11 | f=fopen(NIS_CONF,"w"); | |
12 | if ( f ) | |
13 | { | |
14 | int i; | |
15 | - char *domain=NULL; | |
16 | - if ( DhcpOptions.len[nisDomainName] ) | |
17 | - domain=(char *)DhcpOptions.val[nisDomainName]; | |
18 | - else | |
19 | - domain=(char *)DhcpOptions.val[domainName]; | |
20 | + char *domain=(char *)DhcpOptions.val[nisDomainName]; setdomainname(domain, strlen(domain)+1); | |
21 | for (i=0;i<DhcpOptions.len[nisServers];i+=4) | |
22 | fprintf(f,"domain %s server %u.%u.%u.%u\n",(domain?domain:"localdomain"), | |
23 | ((unsigned char *)DhcpOptions.val[nisServers])[i], |