On Mon, 29 Sep 2014 at 11:06:06 +0200, Laurent Bigonville wrote:
> Apparently there is still some kind of loop here.

Piping the output of the attached script to tsort(1) says:

tsort: -: input contains a loop:
tsort: firewalld.service
tsort: network.target
tsort: network-online.target
tsort: rpcbind.service
tsort: nfs-common.service
tsort: kbd.service
tsort: console-setup.service
tsort: sysinit.target
tsort: cups.path
tsort: paths.target
tsort: basic.target

The loop in a nutshell:

* firewalld.service has the DefaultDependencies, including basic.target.
* basic.target is After sysinit.target which is After all the
  autogenerated systemd units corresponding to LSB init scripts from rcS.d,
  including nfs-common and rpcbind.
* rpcbind wants the network to be online before it does anything.
* firewalld wants to start before network.target so it can set up
  your firewall before the network comes up.

This can't work: firewalld and the NFS bits have incompatible
expectations.

    S
#!/usr/bin/perl

# usage: systemd-analyze --dump | perl cyclist.pl | tsort - > /dev/null

use strict;
use warnings;

# if early is Before: late
# then $before{late}{early} = 1
my %before;

my $in;

while (<>) {
	if (m{^-> Unit (.*):$}) {
		$in = $1;
	}
	elsif (m{^\tBefore: (.*)$}) {
		$before{$1}{$in} = 1;
	}
	elsif (m{^\tAfter: (.*)$}) {
		$before{$in}{$1} = 1;
	}
}

foreach my $late (keys %before) {
	my $earlier = $before{$late};
	foreach my $early (keys %$earlier) {
		print "$early $late\n";
	}
}
_______________________________________________
Pkg-systemd-maintainers mailing list
Pkg-systemd-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-systemd-maintainers

Reply via email to