From: srs5694 Date: Sat, 23 Apr 2016 23:11:08 +0000 (-0400) Subject: Tweaked refind-mkdefault return values for some error conditions. X-Git-Url: https://code.delx.au/refind/commitdiff_plain/69c4acfcdc7121bc0d4f5386910545f4caf134f2?hp=70f87c1ae2dc3488b5ecc80ea6ad4c2a63e51683 Tweaked refind-mkdefault return values for some error conditions. --- diff --git a/docs/man/refind-mkdefault.8 b/docs/man/refind-mkdefault.8 index e8ae0c5..3ac2dde 100644 --- a/docs/man/refind-mkdefault.8 +++ b/docs/man/refind-mkdefault.8 @@ -99,6 +99,12 @@ a buggy EFI or badly damaged NVRAM contents. No rEFInd entry could be found in the list of boot options, and so no changes were made to the boot order list. +.TP +.B 4 +The script could not run because of OS issues -- the OS was not Linux, +the \fIefibootmgr\fR utility was not available, or the script was not run +as \fIroot\fR. + .SH "LIMITATIONS" .TP diff --git a/refind-mkdefault b/refind-mkdefault index 39d7ef7..a48ac5d 100755 --- a/refind-mkdefault +++ b/refind-mkdefault @@ -172,13 +172,13 @@ def main(): if sys.platform != "linux": print("This program is useful only under Linux; exiting!") - return(1) + return(4) if shutil.which("efibootmgr") is None: print("The efibootmgr utility is not installed; exiting!") - return(1) + return(4) if not os.geteuid() == 0: print("This program must be run as root (or via sudo); exiting!") - return(1) + return(4) retval = 0 boot_entries, boot_order = discover_data()