[node-patches] Change in ovirt-node[master]: find_grub_cfg(): Add elif statement to get correct cfg_path ...

fabiand at fedoraproject.org fabiand at fedoraproject.org
Sun Jun 15 10:25:54 UTC 2014


Fabian Deutsch has posted comments on this change.

Change subject: find_grub_cfg(): Add elif statement to get correct cfg_path for efi_boot
......................................................................


Patch Set 5: Code-Review-1

(2 comments)

In general a nice patch, just two things.

http://gerrit.ovirt.org/#/c/26418/5/src/ovirt/node/utils/system.py
File src/ovirt/node/utils/system.py:

Line 803:             cfg_path = "/liveos/EFI"
Line 804:         elif os.path.ismount("/dev/.initramfs/live"):
Line 805:             cfg_path = "/dev/.initramfs/live"
Line 806:         elif os.path.ismount("/run/initramfs/.live"):
Line 807:             cfg_path = "/liveos/grub/grub.conf"
you need to remove grub.conf here.
Line 808: 
Line 809:         filename = "grub.cfg" if Bootloader.is_grub2() else "grub.*"
Line 810: 
Line 811:         cfg = utils.process.check_output(["find", cfg_path, "-type", "f",


Line 807:             cfg_path = "/liveos/grub/grub.conf"
Line 808: 
Line 809:         filename = "grub.cfg" if Bootloader.is_grub2() else "grub.*"
Line 810: 
Line 811:         cfg = utils.process.check_output(["find", cfg_path, "-type", "f",
Please use glob.glob(…) here.
Line 812:                                           "name", filename]).strip()
Line 813: 
Line 814:         if not cfg:
Line 815:             raise RuntimeError("Failed to find the path for grub.[cfg|conf]")


-- 
To view, visit http://gerrit.ovirt.org/26418
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I299fb4906d8d2e947130daea1de570a9347bb202
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hadong <hadong0720 at gmail.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: Itamar Heim <iheim at redhat.com>
Gerrit-Reviewer: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes



More information about the node-patches mailing list