make a package for odhcpc-script
This commit is contained in:
parent
b6e72504d6
commit
9aa5ff6ed1
4 changed files with 6 additions and 2 deletions
|
@ -284,13 +284,12 @@ in rec {
|
||||||
services.dhcp6 =
|
services.dhcp6 =
|
||||||
let
|
let
|
||||||
name = "dhcp6c.wan";
|
name = "dhcp6c.wan";
|
||||||
luafile = writeFennelScript "odhcpc-script" [] ./odhcp6-script.fnl;
|
|
||||||
in longrun {
|
in longrun {
|
||||||
inherit name;
|
inherit name;
|
||||||
notification-fd = 10;
|
notification-fd = 10;
|
||||||
run = ''
|
run = ''
|
||||||
export SERVICE_STATE=/run/service-state/${name}
|
export SERVICE_STATE=/run/service-state/${name}
|
||||||
${pkgs.odhcp6c}/bin/odhcp6c -s ${luafile} -e -v -p /run/${name}.pid -P 48 $(output ${services.wan} ifname)
|
${pkgs.odhcp6c}/bin/odhcp6c -s ${pkgs.odhcp-script} -e -v -p /run/${name}.pid -P 48 $(output ${services.wan} ifname)
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
dependencies = [ services.wan ];
|
dependencies = [ services.wan ];
|
||||||
|
|
|
@ -55,4 +55,5 @@
|
||||||
hi = callPackage ./hi {};
|
hi = callPackage ./hi {};
|
||||||
firewallgen = callPackage ./firewallgen {};
|
firewallgen = callPackage ./firewallgen {};
|
||||||
kernel-modules = callPackage ./kernel-modules {};
|
kernel-modules = callPackage ./kernel-modules {};
|
||||||
|
odhcp-script = callPackage ./odhcp-script {};
|
||||||
}
|
}
|
||||||
|
|
4
pkgs/odhcp-script/default.nix
Normal file
4
pkgs/odhcp-script/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
writeFennelScript
|
||||||
|
}:
|
||||||
|
writeFennelScript "odhcpc-script" [] ./odhcp6-script.fnl
|
Loading…
Reference in a new issue