Skip to content

Commit fa24222

Browse files
esbenrossburton
authored andcommitted
files: overlayfs-create-dirs: Improve mount unit dependency
The RequiresMountsFor configuration option of systemd.unit (added in systemd version 201) not only adds the Requires and After options for the required mount unit, but it adds them for all mount units required to access the specified path. So this change is both a simplification, and an improvement. Not only will all needed mount units be added to Requires and After, but the overlay path does not have to be a mountpoint, but can be at any directory level beneath a mountpoint. Signed-off-by: Esben Haabendal <esben@geanix.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Ross Burton <ross.burton@arm.com>
1 parent 544d8ee commit fa24222

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

meta/files/overlayfs-create-dirs.service.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[Unit]
22
Description=Overlayfs directories setup {LOWERDIR}
3-
Requires={DATA_MOUNT_UNIT}
4-
After={DATA_MOUNT_UNIT}
3+
RequiresMountsFor={DATA_MOUNT_POINT}
54
DefaultDependencies=no
65

76
[Service]

0 commit comments

Comments
 (0)