baseimager: export partition device node
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Thu, 27 Jun 2013 03:56:29 +0000 (06:56 +0300)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Thu, 27 Jun 2013 04:16:44 +0000 (07:16 +0300)
Also export the device node name for each partition. This will be helpful when
we start generating fstab entries in the installer framework scripts.

In MIC environment, the device node name is easily constructed from the disk
name.  The disk name compes from the KS file from the --ondisk option of the
'part' command. And --ondisk is a mandatory argument.

In other installer environments, the disk names may be very different.

Change-Id: Idafce950e511f4a7693e17be10e69fbb1e7d00d8
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
mic/imager/baseimager.py

index 6c91af2..c5672f5 100644 (file)
@@ -444,6 +444,8 @@ class BaseImageCreator(object):
             env.update(self._set_part_env(pnum, "BOOTFLAG", p.active))
             env.update(self._set_part_env(pnum, "ALIGN", p.align))
             env.update(self._set_part_env(pnum, "TYPE_ID", p.part_type))
+            env.update(self._set_part_env(pnum, "DEVNODE",
+                                          "/dev/%s%d" % (p.disk, pnum + 1)))
             pnum += 1
 
         # Count of paritions