Am 01.01.2015 um 03:25 schrieb Michael Biebl: > control: retitle -1 Provides: in SysV init scripts are not handled correctly, > leading to wrong orderings > control: severity -1 serious > > Am 01.01.2015 um 03:08 schrieb Michael Biebl: >> control: found -1 215-8 >> >> Am 01.01.2015 um 02:39 schrieb Luke Diamand: >>> sysv-generator seems to correctly generate an autofs.service file which has >>> a >>> dependency on NIS, specifically, ypbind: >>> >>> $ grep "After" autofs.service >>> After=network-online.target remote-fs.target systemd-journald-dev-log.socket >>> ypbind.service nslcd.service slapd.service >>> >>> But nothing in the nis.service file mentions ypbind, and so the dependency >>> never gets setup, and the ordering isn't reliable. >> >> The /etc/init.d/nis SysV init script has the following LSB header: >> >>> ### BEGIN INIT INFO >>> # Provides: ypbind ypserv ypxfrd yppasswdd >>> # Required-Start: $network $portmap $remote_fs >>> # Required-Stop: $portmap $remote_fs >>> # Default-Start: 2 3 4 5 >>> # Default-Stop: 1 >>> # Short-Description: Start NIS client and server daemons. >>> # Description: Start NIS client and server daemons. NIS is mostly >>> # used to let several machines in a network share the >>> # same account information (eg the password file). >>> ### END INIT INFO >> >> It looks though, as the sysv-genenator does not properly handle >> Provides, especially multiple names listed in Provides. >> >> # systemctl show nis.service | grep Names >> Names=nis.service >> >> The additional Provides should be listed under Names. > > That's the output under systemd v44 > > Names=nis.service ypserv.service ypxfrd.service yppasswdd.service > > which looks correct. > > The corresponding code in sysv-generator in v215 tries to map Provides: to > targets which are pulled in via Wants/Before. This doesn't look like the > correct approach on a cursory glance.
The code in v215: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/src/sysv-generator/sysv-generator.c#n465 The code in v44: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/src/service.c?id=16f1239e1ece27257c0deedcf01aa39474f66241#n733 Note how v44 tries to map Provides to Names, if the unit type is a service: > if (unit_name_to_type(m) == UNIT_SERVICE) > r = unit_add_name(u, m); This code is completely missing in v215. Not sure, why it was dropped. I've CCed Thomas, who implemented the sysv-generator. Maybe he can shed some light on this. Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature