'Get the name of the initrd file to be installed.
Returns:
The full path to the initrd file as it will be
installed on the host. If the package includes no
initrd file, None is returned
Raises:
AutoservError: no package has yet been obtained. Call
RPMKernel.get() with a .rpm package.'

def get_initrd_name(self):

    if (self.source_material is None):
        raise error.AutoservError('A    kernel    must    first    be                                                    specified    via    get()')
    res = utils.run(('rpm    -q    -l    -p    %s    |    grep    /boot/initrd' % self.source_material), ignore_status=True)
    if res.exit_status:
        return None
    return res.stdout.strip()
