'Implements boot once for machines with kernel >= 2.6
This manipulates EFI variables via the interface available at
/sys/firmware/efi/vars'

def boot_once_elilo(self, entry_index):

    info = self.get_entry(entry_index)
    kernel = os.path.basename(info['kernel'])
    args = info['args']
    if (args[0] == '"'):
        args = args[1:]
    if (args[(-1)] == '"'):
        args = args[:(-1)]
    params = ('root=%s    %s' % (info['root'], args))
    data = ('%s    %s' % (kernel, params))
    efi = EfiToolSys()
    if (not efi.create_variable('EliloAlt', data)):
        return (-1)
    eliloconf = EliloConf()
    eliloconf.add_global_option('checkalt')
    eliloconf.add_global_option('initrd', os.path.basename(info['initrd']))
    eliloconf.remove_global_option('prompt')
    eliloconf.update()
    return 0
