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

Always set UUID

parent 984c0f33
......@@ -3,9 +3,11 @@ import subprocess
import re
import ipaddr
import sys
import uuid
def get_nm_extra(device):
result = ""
uuid_is_set = False
try:
import dbus
bus = dbus.SystemBus()
......@@ -37,10 +39,13 @@ def get_nm_extra(device):
connection = settings['connection']
if 'uuid' in connection:
result += 'UUID=%s\n' % connection['uuid']
uuid_is_set = True
if 'zone' in connection:
result += 'ZONE=%s\n' % connection['zone']
except:
pass
if not uuid_is_set:
result += 'UUID=%s\n' % uuid.uuid4()
return result
def interface_is_static(i):
......
Markdown is supported
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