-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix mount propagation #85
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
FILESYSTEMS=( | ||
/run/mnt/base | ||
/run/mnt/data | ||
/run/mnt/gadget | ||
/run/mnt/kernel | ||
/run/mnt/snapd | ||
/run/mnt/ubuntu-boot | ||
/run/mnt/ubuntu-save | ||
/run/mnt/ubuntu-seed | ||
/writable | ||
) | ||
|
||
for fs in "${FILESYSTEMS[@]}"; do | ||
if mountpoint -q "${fs}"; then | ||
mount --make-private "${fs}" | ||
fi | ||
done |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../remount-core-fs.service |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[Unit] | ||
Description=Reset propagation of initial mount points | ||
DefaultDependencies=no | ||
Before=local-fs-pre.target | ||
Before=local-fs.target | ||
Before=shutdown.target | ||
Wants=local-fs-pre.target | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. It only has There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, thanks |
||
Conflicts=shutdown.target | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/usr/lib/core/remount-core-fs | ||
|
||
[Install] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Install section is not needed and it looks like in general we don't add it unless it is the case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know. I am not sure how I feel about the way we do it. We put everything in I have added the I can remove it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually prefer it to stay as I agree it is better to have it as a hint on where the service is expected. But then we should enforce it in next changes as good practice. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have created #86 so we only use install sections and generate the symlinks. |
||
WantedBy=local-fs.target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
local-fs-pre.target
is expected to happen before afaiu.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is in case something happens with
local-fs-pre.target
, like something making it fail.Note that I used roughly the same dependencies as
systemd-remount-fs.service
.