[systemd-devel] [PATCH] sysv-generator: Replace Provides: symlinks with real units
Michael Biebl
mbiebl at gmail.com
Wed Jan 28 05:56:17 PST 2015
2015-01-28 1:44 GMT+01:00 Lennart Poettering <lennart at poettering.net>:
> I am not a fan of this stuff either. I really don't like the TOCTOU
> behaviour I must say...
>
> If this is really just about ".bak", then we can add it to the list of
> suffixes in hidden_files()...
Martin already committed an update [1] to at least ignore all the
temporary files created by dpkg and dpkg-related helper tools.
While adding .bak would probably not be wrong, I don't think it would
solve this particular issue in a robust way.
People are very inventive when it comes to such names. In the Debian
bug report which triggered this patch, the user had a file named
networking.save [2]. Most likely, this had been created by himself and
later on he forgot to remove it.
> I think a much better fix for all of this would be to first read in
> all sysv scripts, and only then start creating aliases.
I guess with "read in", you actually mean read and parse all init
scripts *and* generate all unit files. After that create the symlinks.
So far we read
> everything in, and while doing so already create symlinks, while
> defering creation of the unit files to the end. If we moevd the
> symlink creation part to the end too we could easily check in the sysv
> script hashtable if we have a real script for a name before writing
> out an alias symlink for this.
I agree here and incidentally mentioned that in [3].
Martin and I briefly discussed that in #debian-systemd and IIRC, the
reason why Martin did it this way was simply because it was less work.
Michael
[1] c7088e4999f2e5dd33259948c806f4e2706e77ce
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775404#15
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775404#54
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
More information about the systemd-devel
mailing list