Description of problem: I have an LSB init script that declares a dependency on $local_fs in the Required-Start header. But systemd ignores this. This commit removed that translation in src/core/service.c:sysv_translate_facility http://cgit.freedesktop.org/systemd/systemd/commit/?id=5d4caf565471ff3401bd9b53aa814c8545a18a93 I think this can lead to a race condition when shutting down the system. My script mounts 2 filesystems as part of its service startup. When shutdown occurs, I think there's a race condition where systemd may unmount those filesystems itself before running the init script stop command. The script would like to unmount those filesystems itself after copying some information from them. I don't see any dependencies that would prevent systemd from starting to unmount local filesystems before my service stop script is run. Version-Release number of selected component (if applicable): systemd-204-11.fc19.x86_64 How reproducible: run "systemctl show" for an LSB init service with a dependency on $local_fs and note that the After value does not include local-fs.target Steps to Reproduce: 1. Install an LSB init script with $local_fs in Required-Start 2. Observer 'systemctl show' contents of the After field. 3. Actual results: No dependency on local-fs.target Expected results: A dependency on local-fs.target Additional info:
Isn't there indirect ordering?: your.service After basic.target After sysinit.target After local-fs.target
I think you are correct. I experienced this problem on Fedora 16, and was attempting to troubleshoot whether it would also occur on Fedora 19. I failed to see the indirect ordering. In Fedora 16, I think the problem was that the .mount units created did not specify Before=local-fs.target. So perhaps everything will work properly in Fedora 19. I now see that I should have run "systemctl --after list-dependencies <service>" Sorry for the bother. I am closing this.