Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
5337532e
Commit
5337532e
authored
Apr 01, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: remove symlink trickery previously used for nanobsd images
It's ok to write /etc/resolv.conf.
parent
42225286
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
system.inc
src/etc/inc/system.inc
+2
-2
rc
src/etc/rc
+2
-4
status_interfaces.php
src/www/status_interfaces.php
+2
-1
No files found.
src/etc/inc/system.inc
View file @
5337532e
...
...
@@ -124,7 +124,7 @@ function system_resolvconf_generate($dynupdate = false)
$dnslock
=
lock
(
'resolvconf'
,
LOCK_EX
);
$fd
=
fopen
(
"
{
$g
[
'varetc_path'
]
}
/resolv.conf"
,
"w"
);
$fd
=
fopen
(
'/etc/resolv.conf'
,
'w'
);
if
(
!
$fd
)
{
printf
(
"Error: cannot open resolv.conf in system_resolvconf_generate().
\n
"
);
unlock
(
$dnslock
);
...
...
@@ -133,7 +133,7 @@ function system_resolvconf_generate($dynupdate = false)
fwrite
(
$fd
,
$resolvconf
);
fclose
(
$fd
);
chmod
(
"
{
$g
[
'varetc_path'
]
}
/resolv.conf"
,
0644
);
chmod
(
'/etc/resolv.conf'
,
0644
);
if
(
!
file_exists
(
"/var/run/booting"
))
{
/* restart dhcpd (nameservers may have changed) */
...
...
src/etc/rc
View file @
5337532e
...
...
@@ -175,10 +175,8 @@ if [ ! -L /etc/hosts ]; then
/bin/ln
-s
/var/etc/hosts /etc/hosts
fi
if
[
!
-L
/etc/resolv.conf
]
;
then
/bin/rm
-rf
/etc/resolv.conf
/bin/ln
-s
/var/etc/resolv.conf /etc/resolv.conf
fi
# Remove symlinks that are no longer needed
if
[
-L
/etc/resolv.conf
]
;
then
rm
/etc/resolv.conf
;
fi
# Setup compatibility link for packages that
# have trouble overriding the PREFIX configure
...
...
src/www/status_interfaces.php
View file @
5337532e
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2009 Scott Ullrich <sullrich@gmail.com>.
...
...
@@ -305,7 +306,7 @@ include("head.inc");
<?=
htmlspecialchars
(
$ifinfo
[
'gatewayv6'
]);
?>
</td>
</tr>
<?php
endif
;
if
(
$ifdescr
==
"wan"
&&
file_exists
(
"
{
$g
[
'varetc_path'
]
}
/resolv.conf"
))
:
?>
<?php
endif
;
if
(
$ifdescr
==
'wan'
&&
file_exists
(
'/etc/resolv.conf'
))
:
?>
<tr>
<td
width=
"22%"
class=
"vncellt"
>
<?=
gettext
(
"ISP DNS servers"
);
?>
</td>
<td
width=
"78%"
class=
"listr"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment