dhcp: try /etc/dhcp too for !SUSE && !DEBIAN && !GENTOO (rh #607759)

This commit is contained in:
Dan Williams 2010-06-28 11:18:12 -07:00
parent 2767195a9c
commit 3d4b6163b9

View file

@ -450,6 +450,18 @@ create_dhclient_config (const char *iface,
return FALSE;
}
#if !defined(TARGET_SUSE) && !defined(TARGET_DEBIAN) && !defined(TARGET_GENTOO)
/* Try /etc/dhcp/ too (rh #607759) */
if (!g_file_test (orig, G_FILE_TEST_EXISTS)) {
g_free (orig);
orig = g_strdup_printf (SYSCONFDIR "/dhcp/dhclient-%s.conf", iface);
if (!orig) {
nm_log_warn (LOGD_DHCP, "(%s): not enough memory for dhclient options.", iface);
return FALSE;
}
}
#endif
tmp = g_strdup_printf ("nm-dhclient-%s.conf", iface);
conf_file = g_build_filename ("/var", "run", tmp, NULL);
g_free (tmp);