Jan Kundrát | 01cbcd6 | 2017-10-19 14:08:05 +0200 | [diff] [blame] | 1 | [Unit] |
| 2 | Description=Overlay filesystem over /etc |
| 3 | DefaultDependencies=no |
| 4 | Conflicts=umount.target |
| 5 | Before=local-fs.target umount.target |
| 6 | After=swap.target \x2eov.mount |
| 7 | |
| 8 | [Service] |
| 9 | Type=oneshot |
| 10 | ExecStart=/bin/mkdir /.ov/etc-u |
| 11 | ExecStart=/bin/mkdir /.ov/etc-w |
| 12 | # Moving /etc/machine-id. Cannot --move, we have to --bind. |
| 13 | ExecStart=/bin/touch /.ov/etc-machine-id |
| 14 | ExecStart=/bin/mount --bind /etc/machine-id /.ov/etc-machine-id |
| 15 | ExecStart=/bin/umount /etc/machine-id |
| 16 | ExecStart=/bin/mount overlay -t overlay /etc -olowerdir=/etc,upperdir=/.ov/etc-u,workdir=/.ov/etc-w |
| 17 | ExecStart=/bin/mount --bind /.ov/etc-machine-id /etc/machine-id |
| 18 | ExecStart=/bin/umount /.ov/etc-machine-id |