mount: let pid1 alone handle the default dependencies for mount units
authorFranck Bui <fbui@suse.com>
Thu, 2 Apr 2020 06:29:36 +0000 (08:29 +0200)
committerFranck Bui <fbui@suse.com>
Thu, 9 Apr 2020 13:17:09 +0000 (15:17 +0200)
commit83cdc870949823b5b9fa04dd76e952d42faab0b1
tree28dbf6ba52af8328a644477b1dc4004c75e0e632
parent457d65932b3832cc8fd103d09ffb3e7ea924d07c
mount: let pid1 alone handle the default dependencies for mount units

fstab-generator was also handling the default ordering dependencies for mount
units setup in initrd. To do that it was turning the defaults dependencies off
completely and ordered the mount unit against either local-fs.target or
initrd-fs.target or initrd-root-fs.target itself.

But it had the bad side effect to also remove all other default dependencies as
well. Thus if an initrd mount was using _netdev, the network dependencies were
missing.

In general fstab-generator shouldn't use DefaultDependecies=no because it can
handle only a small set of the default dependencies the rest are dealt by pid1.

So this patch makes pid1 handle all default dependencies.
src/core/mount.c
src/fstab-generator/fstab-generator.c