Commit fd714bc7 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Add comment on who generated ifcfg-*

parent aa2e68b9
......@@ -2,6 +2,7 @@ import hostinfo.util as util
import subprocess
import re
import ipaddr
import sys
def get_nm_extra(device):
result = ""
......@@ -222,7 +223,8 @@ def generate(tree, host):
continue
device_name = device(i.ethernet[0])
if i.bridge[0]:
config = 'DEVICE=%s\n' % i.bridge[0]
config = '# Generated by %s\n' % (' '.join(sys.argv))
config += 'DEVICE=%s\n' % i.bridge[0]
config += 'NAME="%s"\n' % i.bridge[0]
config += 'ONBOOT=yes\n'
config += 'TYPE=Bridge\n'
......@@ -231,7 +233,8 @@ def generate(tree, host):
config += generate_ifcfg(tree, i)
result.append(('ifcfg-%s' % i.bridge[0], config))
config = 'DEVICE=%s\n' % device_name
config = '# Generated by %s\n' % (' '.join(sys.argv))
config += 'DEVICE=%s\n' % device_name
config += 'NAME="%s"\n' % device_name
config += 'HWADDR=%s\n' % i.ethernet[0].upper()
config += 'ONBOOT=yes\n'
......@@ -241,7 +244,8 @@ def generate(tree, host):
result.append(('ifcfg-%s' % device_name, config))
pass
elif i.ethernet[0]:
config = 'DEVICE=%s\n' % device_name
config = '# Generated by %s\n' % (' '.join(sys.argv))
config += 'DEVICE=%s\n' % device_name
config += 'NAME="%s"\n' % device_name
config += 'HWADDR=%s\n' % i.ethernet[0].upper()
config += 'ONBOOT=yes\n'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment