mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-27 21:44:34 +01:00
It's not an error to call configResolv() early.
This commit is contained in:
parent
8ae5bda5aa
commit
6858c47aeb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=22695
@ -437,10 +437,8 @@ configResolv(void)
|
||||
if (!cp || !*cp)
|
||||
goto skip;
|
||||
fp = fopen("/etc/resolv.conf", "w");
|
||||
if (!fp) {
|
||||
msgConfirm("Unable to open /etc/resolv.conf! You will need to do this manually.");
|
||||
if (!fp)
|
||||
return;
|
||||
}
|
||||
if (variable_get(VAR_DOMAINNAME))
|
||||
fprintf(fp, "domain\t%s\n", variable_get(VAR_DOMAINNAME));
|
||||
fprintf(fp, "nameserver\t%s\n", cp);
|
||||
|
@ -437,10 +437,8 @@ configResolv(void)
|
||||
if (!cp || !*cp)
|
||||
goto skip;
|
||||
fp = fopen("/etc/resolv.conf", "w");
|
||||
if (!fp) {
|
||||
msgConfirm("Unable to open /etc/resolv.conf! You will need to do this manually.");
|
||||
if (!fp)
|
||||
return;
|
||||
}
|
||||
if (variable_get(VAR_DOMAINNAME))
|
||||
fprintf(fp, "domain\t%s\n", variable_get(VAR_DOMAINNAME));
|
||||
fprintf(fp, "nameserver\t%s\n", cp);
|
||||
|
@ -437,10 +437,8 @@ configResolv(void)
|
||||
if (!cp || !*cp)
|
||||
goto skip;
|
||||
fp = fopen("/etc/resolv.conf", "w");
|
||||
if (!fp) {
|
||||
msgConfirm("Unable to open /etc/resolv.conf! You will need to do this manually.");
|
||||
if (!fp)
|
||||
return;
|
||||
}
|
||||
if (variable_get(VAR_DOMAINNAME))
|
||||
fprintf(fp, "domain\t%s\n", variable_get(VAR_DOMAINNAME));
|
||||
fprintf(fp, "nameserver\t%s\n", cp);
|
||||
|
Loading…
Reference in New Issue
Block a user