changed the way networking-providers plug themselves before "networking"

svn path=/nixos/trunk/; revision=32781
This commit is contained in:
Mathijs Kwik 2012-03-04 18:44:47 +00:00
parent 8bfe513e75
commit 7d964498b8
3 changed files with 6 additions and 27 deletions

View File

@ -58,15 +58,12 @@ in
# environment.systemPackages = [pkgs.gogoclient];
networking = {
enableIPv6 = true;
interfaceJobs = optional cfg.autorun config.jobs.gogoclient;
};
networking.enableIPv6 = true;
jobs.gogoclient = {
name = "gogoclient";
description = "ipv6 tunnel";
startOn = if cfg.autorun then "started network-interfaces" else "";
startOn = optionalString cfg.autorun "starting networking";
stopOn = "stopping network-interfaces";
script = "cd /var/lib/gogoc; exec gogoc -y -f /etc/gogoc.conf";
path = [pkgs.gogoclient];

View File

@ -150,16 +150,13 @@ in
jobs.gw6c =
{ description = "Gateway6 client";
startOn = if cfg.autorun then "started network-interfaces" else "";
startOn = optionalString cfg.autorun "starting networking";
stopOn = "stopping network-interfaces";
exec = "${gw6cService}/bin/control start";
};
networking = {
enableIPv6 = true;
interfaceJobs = optional cfg.autorun config.jobs.gw6c;
};
networking.enableIPv6 = true;
};

View File

@ -172,17 +172,6 @@ in
configured.
'';
};
networking.interfaceJobs = mkOption {
default = [config.jobs.networkInterfaces];
type = types.list types.attrs;
merge = mergeListOption;
description = ''
List of jobs that bring up additional interfaces.
For example vpn / ipv6 / ppp tasks.
This gets used by certain services as dependency for their upstart job.
'';
};
};
@ -286,16 +275,12 @@ in
jobs.networking = {
name = "networking";
description = "all required interfaces are up";
startOn = concatStringsSep " and " (map (job: "started ${job.name}") cfg.interfaceJobs);
stopOn = concatStringsSep " and " (map (job: "stopping ${job.name}") cfg.interfaceJobs);
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
task = true;
exec = "true";
};
networking.interfaceJobs = [config.jobs.networkInterfaces];
# Set the host name in the activation script. Don't clear it if
# it's not configured in the NixOS configuration, since it may
# have been set by dhclient in the meantime.