Skip to content

mxgrub: Exit codes after grub-install failure #52

Closed
pmenzel opened this issue Aug 30, 2018 · 1 comment
Closed

mxgrub: Exit codes after grub-install failure #52

pmenzel opened this issue Aug 30, 2018 · 1 comment

Comments

@pmenzel
Copy link
Contributor

pmenzel commented Aug 30, 2018

If grub-install returns common exit codes, then should in cmd_install, the and exit 1 be changed to or exit 1?

    if ($mbr_type ne 'GRUB') {
            sys 'grub-install',$root_disk and exit 1;
    }
@donald
Copy link
Collaborator

donald commented Aug 30, 2018

It should be changed to

sys 'grub-install',$root_disk;

because the subroutine sys already does an exit 1if the external command fails, it doesn't return. Inside sys the system @cmd and exit 1; is correct, because the builtin function system returns the exit status of the external command.

@pmenzel pmenzel closed this as completed in c881fbb Sep 2, 2019
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants