Репозитории ALT
S: | 9.4.0-alt2 |
D: | 4.0.0-alt0.1.rc4 |
5.1: | 4.0.15-alt4.M51.1 |
4.1: | 3.0.17-alt4 |
4.0: | 3.0.17-alt2.M40.1 |
3.0: | 1.3.22pl4-alt3 |
+backports: | 3.0.17-alt3.M30 |
Группа :: Система/Серверы
Пакет: dhcpcd
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: dhcpcd-1.3.22pl4-alt-no_false_rename.patch
Скачать
Скачать
--- 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] )