--- dhcpcd-1.3.22-pl4/dhcpconfig.c.orig 2003-10-20 14:37:23 +0400 +++ dhcpcd-1.3.22-pl4/dhcpconfig.c 2003-10-20 14:37:23 +0400 @@ -334,7 +334,7 @@ int dhcpConfig() ((unsigned char *)&DhcpIface.ciaddr)[1], ((unsigned char *)&DhcpIface.ciaddr)[2], ((unsigned char *)&DhcpIface.ciaddr)[3]); - if ( ReplResolvConf ) + if ( ReplResolvConf && DhcpOptions.len[dns] >= 4 ) { resolv_renamed=1+rename(RESOLV_CONF,""RESOLV_CONF".sv"); f=fopen(RESOLV_CONF,"w"); @@ -381,7 +381,9 @@ int dhcpConfig() * because the resolver won't notice the change in resolv.conf */ (void)res_init(); } - if ( ReplNISConf ) + else + unlink(""RESOLV_CONF".sv"); + if ( ReplNISConf && DhcpOptions.len[nisServers] >= 4 ) { yp_renamed=1+rename(NIS_CONF,""NIS_CONF".sv"); f=fopen(NIS_CONF,"w"); @@ -406,7 +408,9 @@ int dhcpConfig() else syslog(LOG_ERR,"dhcpConfig: fopen: %m\n"); } - if ( ReplNTPConf ) + else + unlink(""NIS_CONF".sv"); + if ( ReplNTPConf && DhcpOptions.len[ntpServers]>=4 ) { ntp_renamed=1+rename(NTP_CONF,""NTP_CONF".sv"); f=fopen(NTP_CONF,"w"); @@ -454,6 +458,8 @@ int dhcpConfig() else syslog(LOG_ERR,"dhcpConfig: fopen: %m\n"); } + else + unlink(""NTP_CONF".sv"); if ( SetHostName ) { if ( ! DhcpOptions.len[hostName] )