现象:
在修改⽹卡配置的ip后,
service network restart
后/f就会被修改为之前的值。
搜了⼀些⽅法:
confmy.oschina/HIJAY/blog/223118
my.oschina/HIJAY/blog/223140
但是不能⽣效。但是从这⾥⽂章中发现NetworkManager是⼀个service,因此顺⼿执⾏了
service NetworkManager status
输出:
[root@localhost ~]# service NetworkManager status
Redirecting to /bin/systemctl status NetworkManager.service
NetworkManager.service - Network Manager
Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled; vendor preset: enabled)
Active: inactive (dead) since Wed 2020-09-09 04:56:10 CAT; 18min ago
Docs: man:NetworkManager(8)
Main PID: 1157 (code=exited, status=0/SUCCESS)
Sep 09 04:54:11 localhost.localdomain NetworkManager[1157]: [1599620051.6457] device (ens33): carrier: link connected Sep 09 04:54:11 localhost.localdomain NetworkManager[1157]: [1599620051.6672] ifcfg-rh: cannot load
/etc/sysconfig/network-scripts/ifcfg-ens33.L5 due b,"ens33")
Sep 09 04:54:11 localhost.localdomain NetworkManager[1157]: [1599620051.6859] ifcfg-rh: cannot lo
ad
/etc/sysconfig/network-scripts/ifcfg-ens33.L5 due b,"ens33")
Sep 09 04:54:15 localhost.localdomain NetworkManager[1157]: [1599620055.7753] ifcfg-rh: cannot load
/etc/sysconfig/network-scripts/ifcfg-ens33.L5 due b,"ens33")
Sep 09 04:54:15 localhost.localdomain NetworkManager[1157]: [1599620055.8549] ifcfg-rh: cannot load
/etc/sysconfig/network-scripts/ifcfg-ens33.L5 due b,"ens33")
Sep 09 04:56:10 localhost.localdomain NetworkManager[1157]: [1599620170.3910] caught SIGTERM, shutting down normally.
Sep 09 04:56:10 localhost.localdomain systemd[1]: Stopping
Sep 09 04:56:10 localhost.localdomain NetworkManager[1157]: [1599620170.3985] manager: NetworkManager state is now CONNECTED_SITE
Sep 09 04:56:10 localhost.localdomain NetworkManager[1157]: [1599620170.4011] exiting (success)
Sep 09 04:56:10 localhost.localdomain systemd[1]: Stopped Network Manager.
Hint: Some lines were ellipsized, use -l to show in full.
原来是之前复制的
/etc/sysconfig/network-scripts/ifcfg-ens33.L5
配置⽂件也被NetworkManager解析使⽤了。这个⽂件是多余的,复制⾃ifcfg-ens33。
因此把⽂件挪⾛,重新
service network restart
此时f就不会再被修改了。
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论