nspawn, machine-id-setup: warn if read-only mount call fails

They are not crucial, but they shouldn't fail.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2013-03-31 14:32:48 -04:00
parent d73c3269cd
commit 10d18763ec
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -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: