nspawn: if we can't mark the boot ID RO let's fail

It's probably better to be safe here.
This commit is contained in:
Lennart Poettering
2016-08-03 14:52:16 +02:00
parent 7049382803
commit f7b7b3df9e
+1 -1
View File
@@ -1320,7 +1320,7 @@ static int setup_boot_id(const char *dest) {
if (mount(from, to, NULL, MS_BIND, NULL) < 0)
r = log_error_errno(errno, "Failed to bind mount boot id: %m");
else if (mount(NULL, to, NULL, MS_BIND|MS_REMOUNT|MS_RDONLY|MS_NOSUID|MS_NODEV, NULL) < 0)
log_warning_errno(errno, "Failed to make boot id read-only, ignoring: %m");
r = log_error_errno(errno, "Failed to make boot id read-only: %m");
(void) unlink(from);
return r;