summaryrefslogtreecommitdiff
path: root/src/core/machine-id-setup.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-30 16:33:55 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-31 14:32:48 -0400
commit10d18763ec6f31ded1535f810be765f7fab2d97d (patch)
tree43fc104c5c59ee97687f338e1c6cc86b5a641cae /src/core/machine-id-setup.c
parentd73c3269cd3c92bb26f5e161516c587f2874c8c5 (diff)
nspawn, machine-id-setup: warn if read-only mount call fails
They are not crucial, but they shouldn't fail.
Diffstat (limited to 'src/core/machine-id-setup.c')
-rw-r--r--src/core/machine-id-setup.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c
index ca163978f..146c5653c 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: