1 |
Even though squashfs is not writeable, it must be mounted with -o ro in |
2 |
order to be mounted multiple times. This allows, for example, the same |
3 |
snapshot to be mounted simultaneously in multiple catalyst chroots. |
4 |
|
5 |
Signed-off-by: Matt Turner <mattst88@g.o> |
6 |
--- |
7 |
catalyst/base/stagebase.py | 4 +++- |
8 |
1 file changed, 3 insertions(+), 1 deletion(-) |
9 |
|
10 |
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py |
11 |
index 55d1032d..651bf4e4 100644 |
12 |
--- a/catalyst/base/stagebase.py |
13 |
+++ b/catalyst/base/stagebase.py |
14 |
@@ -868,7 +868,9 @@ class StageBase(TargetBase, ClearBase, GenBase): |
15 |
mount += ['-t', 'tmpfs', '-o', 'noexec,nosuid,nodev'] |
16 |
else: |
17 |
source_path = Path(self.mount[x]['source']) |
18 |
- if source_path.suffix != '.sqfs': |
19 |
+ if source_path.suffix == '.sqfs': |
20 |
+ mount += ['-o', 'ro'] |
21 |
+ else: |
22 |
mount.append('--bind') |
23 |
|
24 |
# We may need to create the source of the bind mount. E.g., in the |
25 |
-- |
26 |
2.26.2 |