[systemd-devel] [PATCH] sysv-generator: handle Provides: for non-virtual facility names

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Mon Jan 5 15:25:01 PST 2015


On Tue, Jan 06, 2015 at 12:01:35AM +0100, Michael Biebl wrote:
> Hi,
> 
> 
> 2015-01-05 14:35 GMT+01:00 Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>:
> > On Mon, Jan 05, 2015 at 10:30:11AM +0100, Michael Biebl wrote:
> >> +        link = strjoin(arg_dest, "/", alias, NULL);
> >> +        if (!link)
> >> +                return log_oom();
> > path_join()?
> 
> I borrowed from the existing code in add_symlink(). Will update it to
> path_join() if you think this is more suitable.
Doesn't matter too much in this case I guess, since there's no arg_root.

> >
> >> +
> >> +        r = symlink(service, link);
> > Those will be dangling links, no? They will work with current implementation,
> > but it would be nicer to create a working symlink.
> 
> No, they are not danglink symlinks:
> 
> $ head /etc/init.d/networking
> #!/bin/sh -e
> ### BEGIN INIT INFO
> # Provides:          networking ifupdown
> ...
> 
> $ ls -al /run/systemd/generator.late/{ifupdown,networking}.service
> lrwxrwxrwx 1 root root  18 Jan  5 23:56
> /run/systemd/generator.late/ifupdown.service -> networking.service
> -rw-r--r-- 1 root root 538 Jan  5 23:56
> /run/systemd/generator.late/networking.service
Ah, OK, I didn't see that it's a symlink to a local file.
So the patch is fine as is.

Zbyszek


More information about the systemd-devel mailing list