Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Create mount-snap.service
Browse files Browse the repository at this point in the history
creating the service file that ensures that the symlink /snap to /var/mnt/snap exists.
Based on coreos/rpm-ostree#337 (comment) and coreos/rpm-ostree#337 (comment)
  • Loading branch information
realgrm authored May 19, 2021
1 parent d024c5a commit 78c6036
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions mount-snap.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Prepare mount points
Before=remote-fs-pre.target
Wants=remote-fs-pre.target

[Service]
Type=oneshot
ExecStartPre=chattr -i /
ExecStart=/bin/sh -c "[ -L '/snap' ] || ln -s '/var/mnt/snap' '/snap'"
ExecStopPost=chattr +i /

[Install]
WantedBy=remote-fs.target

0 comments on commit 78c6036

Please sign in to comment.