mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-25 18:50:44 +03:00
remount: Skip remount /sysroot if invisible
This commit is contained in:
parent
034243e748
commit
d58d564727
@ -225,13 +225,19 @@ main (int argc, char *argv[])
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
/* Handle remounting /sysroot; if it's explicitly marked as read-only (opt in)
|
||||
/* Handle remounting /sysroot;
|
||||
* If it's made invisible, do nothing.
|
||||
* if it's explicitly marked as read-only (opt in)
|
||||
* then ensure it's readonly, otherwise mount writable, the same as /
|
||||
*/
|
||||
gboolean sysroot_configured_invisible = FALSE;
|
||||
g_variant_dict_lookup (ostree_run_metadata, OTCORE_RUN_BOOTED_KEY_SYSROOT_INVISIBLE, "b",
|
||||
&sysroot_configured_invisible);
|
||||
gboolean sysroot_configured_readonly = FALSE;
|
||||
g_variant_dict_lookup (ostree_run_metadata, OTCORE_RUN_BOOTED_KEY_SYSROOT_RO, "b",
|
||||
&sysroot_configured_readonly);
|
||||
do_remount ("/sysroot", !sysroot_configured_readonly);
|
||||
if (!sysroot_configured_invisible)
|
||||
do_remount ("/sysroot", !sysroot_configured_readonly);
|
||||
|
||||
/* And also make sure to make /etc rw again. We make this conditional on
|
||||
* sysroot_configured_readonly && !transient_etc because only in that case is it a
|
||||
|
Loading…
x
Reference in New Issue
Block a user