mount: default startup dependencies and default network ones are orthogonal
authorFranck Bui <fbui@suse.com>
Thu, 2 Apr 2020 06:51:00 +0000 (08:51 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 31 May 2020 05:05:13 +0000 (07:05 +0200)
commit7bc4bcea15aa837100284f7379f066f72b34b5b0
treec6146b885b70e5b8feede514ca7c38561be09de8
parent7fe617fa53815ce4d7c71882458b8f62999b91aa
mount: default startup dependencies and default network ones are orthogonal

Regardless of whether a mount is setup in initrd or int the main system,
the network default dependencies _netdev should still be honored.

IOW if a mount unit use the following options "x-initrd.mount,_netdev", it
should be ordered against initrd-fs.target, network.target,
network-online.target.

/dev/vdb1 /mnt ext4 x-initrd.mount,_netdev defaults 0 0

Before this patch:

Before=umount.target initrd-fs.target
After=system.slice sysroot.mount dev-vdb1.device -.mount systemd-journald.socket blockdev@dev-vdb1.target

After this patch:

Before=initrd-fs.target umount.target
After=network-online.target -.mount blockdev@dev-vdb1.target dev-vdb1.device sysroot.mount system.slice network.target systemd-journald.socket

(cherry picked from commit 2ec15c4f8a288d4f2e92ba2b8586736b2a07b9ea)
src/core/mount.c