mirror of
https://github.com/xcat2/confluent.git
synced 2025-02-10 15:55:27 +00:00
Tighten umask on confignet to avoid ubuntu warnings
This commit is contained in:
parent
bb04faed04
commit
a94b9235e8
@ -192,8 +192,10 @@ class NetplanManager(object):
|
||||
if needcfgwrite:
|
||||
needcfgapply = True
|
||||
newcfg = {'network': {'version': 2, 'ethernets': {devname: self.cfgbydev[devname]}}}
|
||||
oumask = os.umask(0o77)
|
||||
with open('/etc/netplan/{0}-confluentcfg.yaml'.format(devname), 'w') as planout:
|
||||
planout.write(yaml.dump(newcfg))
|
||||
os.umask(oumask)
|
||||
if needcfgapply:
|
||||
subprocess.call(['netplan', 'apply'])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user