hardcode dnsserver,不需要重写etc / resolv.conf

man NetworkManager.conf ... none:NetworkManager不会修改resolv.conf。这意味着rc-manager不受管理
.

0

linux命令:f="/etc/NetworkManager/NetworkManager.conf"; if ! grep ^dns $f > /dev/null; then sudo sed -i.bkp '/\[main\]/a dns=none' $f; fi fi $f; dns=none' '/\[main\]/a -i.bkp sed sudo then /dev/null; > $f ^dns grep ! if f="/etc/NetworkManager/NetworkManager.conf"; f="/etc/NetworkManager/NetworkManager.conf"; if ! grep ^dns $f > /dev/null; then sudo sed -i.bkp '/\[main\]/a dns=none' $f; firootopen.com
linux命令:f="/etc/NetworkManager/NetworkManager.conf"; if ! grep ^dns $f > /dev/null; then sudo sed -i.bkp '/\[main\]/a dns=none' $f; fi fi $f; dns=none' '/\[main\]/a -i.bkp sed sudo then /dev/null; > $f ^dns grep ! if f="/etc/NetworkManager/NetworkManager.conf"; f="/etc/NetworkManager/NetworkManager.conf"; if ! grep ^dns $f > /dev/null; then sudo sed -i.bkp '/\[main\]/a dns=none' $f; firootopen.com
cvnc 2018-04-10 03:59:48
输出
替代方案1 hardcode dnsserver,不需要重写etc / resolv.conf

while循环是一种矫枉过正的行为,防止文件被修改会更简单。也就是说,所有的解决方案都是这样的,一个真正的解决办法是解决问题的源头。.

linux命令:chkmod -w /etc/resolve.conf /etc/resolve.conf -w chkmod chkmod -w /etc/resolve.confrootopen.com
linux命令:chkmod -w /etc/resolve.conf /etc/resolve.conf -w chkmod chkmod -w /etc/resolve.confrootopen.com
.
输出

评论

相关推荐
共收录0条命令行
这里是记录和分享命令行的地方, 所有命令行都可以进行评论、提交替代方案.

推荐
    热门命令