Using UUID by default.

netsetup
Mike Hiretsky 14 years ago
parent 11f456ef39
commit d8d3d980a6

@ -332,6 +332,15 @@ class fillVars(object, glob_attr):
"""List mount options for partition devices"""
return self.getAttributeFromHash('os_disk_hash','options')
def get_os_install_disk_use(self):
"""Get real id (by cl_uuid_set) device"""
if self.Get('cl_uuid_set') == "on":
return map(lambda x:"UUID=%s"%x[0] if x[0] else x[1],
zip(self.Get('os_install_disk_uuid'),
self.Get('os_disk_dev')))
else:
return self.Get('os_disk_dev')
def get_os_install_disk_uuid(self):
"""List uudi for partition devices"""
devuuid = '/dev/disk/by-uuid'
@ -430,7 +439,7 @@ class fillVars(object, glob_attr):
def get_os_install_fstab_mount_conf(self):
"""Information about mount points for fstab"""
devicesForFstab = sorted(filter(lambda x:x[1] != "" and x[1] != "swap",
zip(self.Get('os_disk_dev'),
zip(self.Get('os_install_disk_use'),
self.Get('os_install_disk_mount'),
self.Get('os_install_disk_format'),
self.Get('os_install_disk_options'))),
@ -515,7 +524,7 @@ class fillVars(object, glob_attr):
"""Information about swap for fstab"""
return "\n".join(map(lambda x: "%s\tnone\tswap\tsw\t0 0"%x[0],
filter(lambda x: x[1] == "swap",
zip(self.Get('os_disk_dev'),
zip(self.Get('os_install_disk_use'),
self.Get('os_install_disk_mount')))))
def get_os_install_linux_system(self):

@ -82,6 +82,9 @@ class Data:
# uudi for install
os_install_disk_uuid = {}
# /dev/sd or UUID= list (by cl_uuid_set)
os_install_disk_use = {}
cl_uuid_set = {'value':'on'}
# install partition's system id

Loading…
Cancel
Save