mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
remount: Still remount /sysroot writable if not configured ro
Regression from 3564225917
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1862568
We still need to remount writable if it's not configured on;
because it may need OS adjustments it needs to be opt-in.
This commit is contained in:
parent
a5409b872f
commit
33eeb7b9eb
@ -106,11 +106,11 @@ main(int argc, char *argv[])
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
/* Handle remounting /sysroot read-only now */
|
||||
if (unlink (_OSTREE_SYSROOT_READONLY_STAMP) == 0)
|
||||
{
|
||||
do_remount ("/sysroot", false);
|
||||
}
|
||||
/* Handle remounting /sysroot; if it's explicitly marked as read-only (opt in)
|
||||
* then ensure it's readonly, otherwise mount writable, the same as /
|
||||
*/
|
||||
bool sysroot_configured_readonly = unlink (_OSTREE_SYSROOT_READONLY_STAMP) == 0;
|
||||
do_remount ("/sysroot", !sysroot_configured_readonly);
|
||||
|
||||
/* If /var was created as as an OSTree default bind mount (instead of being a separate filesystem)
|
||||
* then remounting the root mount read-only also remounted it.
|
||||
|
Loading…
Reference in New Issue
Block a user