<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Microsoft JhengHei";
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@Microsoft JhengHei";}
@font-face
        {font-family:"\@MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.crayon-i
        {mso-style-name:crayon-i;}
span.crayon-h
        {mso-style-name:crayon-h;}
span.crayon-cn
        {mso-style-name:crayon-cn;}
span.crayon-o
        {mso-style-name:crayon-o;}
span.crayon-v
        {mso-style-name:crayon-v;}
span.crayon-sy
        {mso-style-name:crayon-sy;}
span.E-MailFormatvorlage25
        {mso-style-type:personal-reply;
        font-family:"Arial",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE-CH link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt'>Hi Zhengyu Pan<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt'>Have you tried to put this nameserver address in dhclient.conf? <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt'>From man dhclient.conf<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt;font-family:"Courier New"'>     append { [option declaration] [, ... option declaration] }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt;font-family:"Courier New"'>             If for some set of options the client should first use the values<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt;font-family:"Courier New"'>             supplied by the server, if any, and then use values you supply,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt;font-family:"Courier New"'>             these values can be defined in the append statement.  The append<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt;font-family:"Courier New"'>             statement can only be used for options which allow more than one<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt;font-family:"Courier New"'>             value to be given.  This restriction is not enforced - if you<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt;font-family:"Courier New"'>             ignore it, the behaviour will be unpredictable.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt'>I haven’t use the ap- or prepend options, but the supersede option work like a charm (at least on FreeBSD)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt'>/BR<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt'>Philippe<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-US'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-GB>From:</span></b><span lang=EN-GB> bind-users <bind-users-bounces@lists.isc.org> <b>On Behalf Of </b>Zhengyu Pan(???????????????)<br></span><b><span lang=DE>Sent:</span></b><span lang=DE> Thursday, December 19, 2019 10:01 AM<br><b>To:</b> bind-users@lists.isc.org<br><b>Subject:</b> dhclient hook not overwritten /etc/resolv.conf<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><span class=crayon-i><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm;background:#FCFCFC'>Hi,</span></span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm;background:#FCFCFC'><br><br></span><o:p></o:p></p></div><div><p class=MsoNormal><span class=crayon-i><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm;background:#FCFCFC'>My OS is Centos7. I add a bash script dns.sh in /etc/dhcp/dhclient-exit-hooks.d . The script content is</span></span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm;background:#FCFCFC'><br><br></span><o:p></o:p></p></div><div><p class=MsoNormal><span class=crayon-i><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm;background:#FCFCFC'>#!/bin/bash</span></span><o:p></o:p></p></div><p class=MsoNormal><span class=crayon-i><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'>echo</span></span><span class=crayon-h><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'> </span></span><span style='font-size:10.5pt;font-family:"Courier New";background:#FAFAFA'>“</span><span class=crayon-i><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'>nameserver</span></span><span class=crayon-h><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'> </span></span><span class=crayon-cn><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'>1.1.1.1</span></span><span style='font-size:10.5pt;font-family:"Courier New";background:#FAFAFA'>”</span><span class=crayon-h><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'> </span></span><span class=crayon-o><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'>>></span></span><span class=crayon-h><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'> </span></span><span class=crayon-o><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'>/</span></span><span class=crayon-v><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'>etc</span></span><span class=crayon-o><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'>/</span></span><span class=crayon-v><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'>resolv</span></span><span class=crayon-sy><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'>.</span></span><span class=crayon-i><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'>conf</span></span> <o:p></o:p></p><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'><br><br></span><o:p></o:p></p></div><div><p class=MsoNormal><span class=crayon-i><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'>I want to append a nameserver in /etc/resove.conf.</span></span><o:p></o:p></p></div><div><p class=MsoNormal><span class=crayon-i><span style='font-size:10.5pt;font-family:"Courier New";border:none windowtext 1.0pt;padding:0cm'>However, when I restart network. </span></span><span style='font-size:10.5pt;font-family:"Courier New";color:#222222'>/etc/resove.conf not changed.</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Courier New";color:#222222'>/etc/resove.conf.save append this line. </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Courier New";color:#222222'>Why happens that? How can I append a nameserver in /etc/resove.conf?</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Courier New";color:#222222'><br><br></span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Courier New";color:#222222'>Zhengyu</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Courier New";color:#222222'>Best Wishes</span><o:p></o:p></p></div><p class=MsoNormal><span style='font-family:"MS Gothic"'>如果您</span><span style='font-family:"Microsoft JhengHei",sans-serif'>错误接收了该邮件,请通过电子邮件立即通知我们。请回复邮件到</span> <a href="mailto:hqs-spmc@chinaunicom.cn,即可以退订此邮件。我们将立即将您的信息从我们的发送目录中删除">hqs-spmc@chinaunicom.cn<span style='font-family:"MS Gothic"'>,即可以退</span><span style='font-family:"Microsoft JhengHei",sans-serif'>订此邮件。我们将立即将您的信息从我们的发送目录中删除</span></a><span style='font-family:"Microsoft JhengHei",sans-serif'>。</span> If you have received this email in error please notify us immediately by e-mail. Please reply to <a href="mailto:hqs-spmc@chinaunicom.cn">hqs-spmc@chinaunicom.cn</a> ,you can unsubscribe from this mail. We will immediately remove your information from send catalogue of our. <o:p></o:p></p></div></body></html>