Merge pull request #2160 from cgwalters/sysroot-ro
remount: Still remount /sysroot writable if not configured ro
This commit is contained in:
commit
9832a36a8c
|
|
@ -106,11 +106,11 @@ main(int argc, char *argv[])
|
||||||
exit (EXIT_SUCCESS);
|
exit (EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle remounting /sysroot read-only now */
|
/* Handle remounting /sysroot; if it's explicitly marked as read-only (opt in)
|
||||||
if (unlink (_OSTREE_SYSROOT_READONLY_STAMP) == 0)
|
* then ensure it's readonly, otherwise mount writable, the same as /
|
||||||
{
|
*/
|
||||||
do_remount ("/sysroot", false);
|
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)
|
/* 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.
|
* then remounting the root mount read-only also remounted it.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue