Fix bug.
This commit is contained in:
parent
5c13ee9463
commit
c6c4ecedff
|
@ -150,8 +150,9 @@ def main():
|
||||||
yaml.dump(netplan_config_yaml, f)
|
yaml.dump(netplan_config_yaml, f)
|
||||||
netplan_get_status = os.system('sudo netplan get')
|
netplan_get_status = os.system('sudo netplan get')
|
||||||
if netplan_get_status == 0:
|
if netplan_get_status == 0:
|
||||||
os.system('sudo netplan try --timeout 10')
|
os.system('sudo netplan try --timeout 10 && echo "Finish configuring netplan!" && exit 0')
|
||||||
print("Finish configuring netplan!")
|
f.write(org_file_contents)
|
||||||
|
print("Recover changed!")
|
||||||
else:
|
else:
|
||||||
print("Something went wrong!")
|
print("Something went wrong!")
|
||||||
f.write(org_file_contents)
|
f.write(org_file_contents)
|
||||||
|
|
Loading…
Reference in New Issue