From 10d18763ec6f31ded1535f810be765f7fab2d97d Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sat, 30 Mar 2013 16:33:55 -0400 Subject: nspawn, machine-id-setup: warn if read-only mount call fails They are not crucial, but they shouldn't fail. --- src/core/machine-id-setup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core/machine-id-setup.c') diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c index ca163978f3..146c5653c9 100644 --- a/src/core/machine-id-setup.c +++ b/src/core/machine-id-setup.c @@ -235,7 +235,9 @@ int machine_id_setup(void) { log_info("Installed transient /etc/machine-id file."); /* Mark the mount read-only */ - mount(NULL, "/etc/machine-id", NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, NULL); + if (mount(NULL, "/etc/machine-id", NULL, + MS_BIND|MS_RDONLY|MS_REMOUNT, NULL) < 0) + log_warning("Failed to make transient /etc/machine-id read-only"); } finish: -- cgit v1.2.3-54-g00ecf