[systemd-devel] [PATCH] core: improve error message when machine id is missing

Jan Synacek jsynacek at redhat.com
Thu Oct 23 07:24:52 PDT 2014


Jan Synacek <jsynacek at redhat.com> writes:

> ---
>  src/core/machine-id-setup.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c
> index efb074f..eba35be 100644
> --- a/src/core/machine-id-setup.c
> +++ b/src/core/machine-id-setup.c
> @@ -191,7 +191,11 @@ int machine_id_setup(const char *root) {
>                  else {
>                          fd = open(etc_machine_id, O_RDONLY|O_CLOEXEC|O_NOCTTY);
>                          if (fd < 0) {
> -                                log_error("Cannot open %s: %m", etc_machine_id);
> +                                log_error("System cannot boot: Missing /etc/machine-id and /etc is mounted read-only.\n"
> +                                          "Booting up is supported only when:\n"
> +                                          "1) /etc/machine-id exists and is populated.\n"
> +                                          "2) /etc/machine-id exists and is empty.\n"
> +                                          "3) /etc/machine-id is missing and /etc is writable.\n");
>                                  return -errno;
>                          }
>  
> -- 
> 1.9.3
>

Not sure if this message ever got through, so resending.

-- 
Jan Synacek
Software Engineer, Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141023/6c101cf8/attachment-0001.sig>


More information about the systemd-devel mailing list