mirror of
https://github.com/ostreedev/ostree.git
synced 2025-04-01 18:50:37 +03:00
prepare-root: It's not necessary to make /var slave anymore
This commit is contained in:
parent
d25cd57052
commit
d472e60e03
@ -238,7 +238,7 @@ fstab_generator (const char *ostree_target, const bool is_aboot, const char *nor
|
||||
"[Mount]\n"
|
||||
"Where=%s\n"
|
||||
"What=%s\n"
|
||||
"Options=bind,slave,shared\n",
|
||||
"Options=bind\n",
|
||||
var_dst, var_src))
|
||||
return FALSE;
|
||||
|
||||
|
@ -640,16 +640,6 @@ main (int argc, char *argv[])
|
||||
|
||||
if (umount2 (var_dir, MNT_DETACH) < 0)
|
||||
err (EXIT_FAILURE, "failed to umount %s", var_dir);
|
||||
|
||||
/* To avoid having submounts of /var propagate into $stateroot/var, the
|
||||
* mount is made with slave+shared propagation. See the comment in
|
||||
* ostree-impl-system-generator.c when /var isn't mounted in the
|
||||
* initramfs for further explanation.
|
||||
*/
|
||||
if (mount (NULL, TMP_SYSROOT "/var", NULL, MS_SLAVE | MS_SILENT, NULL) < 0)
|
||||
err (EXIT_FAILURE, "failed to change /var to slave mount");
|
||||
if (mount (NULL, TMP_SYSROOT "/var", NULL, MS_SHARED | MS_SILENT, NULL) < 0)
|
||||
err (EXIT_FAILURE, "failed to change /var to slave+shared mount");
|
||||
}
|
||||
|
||||
/* This can be used by other things to signal ostree is in use */
|
||||
|
Loading…
x
Reference in New Issue
Block a user