Skip to content

Commit cc8206d

Browse files
committed
libc: Note resolv_conf=/dev/null will avoid overwriting resolv.conf
1 parent 933038d commit cc8206d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

libc.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ elif [ -d "$SYSCONFDIR"/resolvconf ]; then
9494
fi
9595
fi
9696
: ${resolv_conf:=/etc/resolv.conf}
97+
if [ "$resolv_conf" = "/dev/null" ]; then
98+
exit 0
99+
fi
97100
: ${resolv_conf_tmp:="$resolv_conf.$$.openresolv"}
98101
: ${libc_service:=nscd}
99102
: ${list_resolv:=@SBINDIR@/resolvconf -L}

resolvconf.conf.5.in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2323
.\" SUCH DAMAGE.
2424
.\"
25-
.Dd March 24, 2025
25+
.Dd April 21, 2025
2626
.Dt RESOLVCONF.CONF 5
2727
.Os
2828
.Sh NAME
@@ -190,6 +190,11 @@ directly:-
190190
Defaults to
191191
.Pa /etc/resolv.conf
192192
if not set.
193+
Set to
194+
.Pa /dev/null
195+
to stop
196+
.Xr resolvconf 8
197+
from changing it.
193198
.It Sy resolv_conf_options
194199
A list of libc resolver options, as specified in
195200
.Xr resolv.conf 5 .

0 commit comments

Comments
 (0)