do not always stop networkd
This commit is contained in:
parent
b155d3eff0
commit
4e1afd60a4
|
@ -386,6 +386,7 @@ class NetworkController(BaseController):
|
||||||
await arun_command(
|
await arun_command(
|
||||||
['netplan', 'generate', '--root', self.root], check=True)
|
['netplan', 'generate', '--root', self.root], check=True)
|
||||||
else:
|
else:
|
||||||
|
if devs_to_down or devs_to_delete:
|
||||||
try:
|
try:
|
||||||
await arun_command(
|
await arun_command(
|
||||||
['systemctl', 'stop', 'systemd-networkd.service'],
|
['systemctl', 'stop', 'systemd-networkd.service'],
|
||||||
|
@ -393,7 +394,9 @@ class NetworkController(BaseController):
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
error("stop-networkd")
|
error("stop-networkd")
|
||||||
raise
|
raise
|
||||||
|
if devs_to_down:
|
||||||
await self._down_devs(devs_to_down)
|
await self._down_devs(devs_to_down)
|
||||||
|
if devs_to_delete:
|
||||||
await self._delete_devs(devs_to_delete)
|
await self._delete_devs(devs_to_delete)
|
||||||
try:
|
try:
|
||||||
await arun_command(['netplan', 'apply'], check=True)
|
await arun_command(['netplan', 'apply'], check=True)
|
||||||
|
|
Loading…
Reference in New Issue