- os.mkdir(os.path.join(rootdir, 'etc', 'network', 'interfaces.d'))
-
- elif not os.path.exists(os.path.join(rootdir, 'etc', 'network', 'interfaces')):
- iface_path = os.path.join(rootdir, 'etc', 'network', 'interfaces')
- with open(iface_path, 'w') as netfile:
+ elif not os.path.exists(ifc_file):
+ with open(ifc_file, 'a') as netfile: