nixos/cjdns: update for cjdns 22.1 compatibility
This commit is contained in:
parent
15e8c2a2f2
commit
7476494b3b
@ -49,7 +49,7 @@ let
|
||||
k: v:
|
||||
lib.optionalString (
|
||||
v.hostname != ""
|
||||
) "echo $(${pkgs.cjdns}/bin/publictoip6 ${v.publicKey}) ${v.hostname}"
|
||||
) "echo $(${pkgs.cjdns}/bin/cjdnstool util key2ip6 ${v.publicKey}) ${v.hostname}"
|
||||
) (cfg.ETHInterface.connectTo // cfg.UDPInterface.connectTo)
|
||||
)}
|
||||
'';
|
||||
@ -268,7 +268,7 @@ in
|
||||
|
||||
if [ -z "$CJDNS_PRIVATE_KEY" ]; then
|
||||
shopt -s lastpipe
|
||||
${pkg}/bin/makekeys | { read private ipv6 public; }
|
||||
${pkg}/bin/cjdnstool util keygen | { read private ipv6 public; }
|
||||
|
||||
install -m 600 <(echo "CJDNS_PRIVATE_KEY=$private") /etc/cjdns.keys
|
||||
install -m 444 <(echo -e "CJDNS_IPV6=$ipv6\nCJDNS_PUBLIC_KEY=$public") /etc/cjdns.public
|
||||
|
@ -105,7 +105,7 @@ in
|
||||
|
||||
def cjdns_ip(machine):
|
||||
res = machine.succeed("ip -o -6 addr show dev tun0")
|
||||
ip = re.split("\s+|/", res)[3]
|
||||
ip = re.split("\\s+|/", res)[3]
|
||||
machine.log("has ip {}".format(ip))
|
||||
return ip
|
||||
|
||||
@ -116,14 +116,14 @@ in
|
||||
|
||||
# ping a few times each to let the routing table establish itself
|
||||
|
||||
alice.succeed("ping -c 4 {}".format(carol_ip6))
|
||||
bob.succeed("ping -c 4 {}".format(carol_ip6))
|
||||
alice.wait_until_succeeds("ping -c 4 {}".format(carol_ip6))
|
||||
bob.wait_until_succeeds("ping -c 4 {}".format(carol_ip6))
|
||||
|
||||
carol.succeed("ping -c 4 {}".format(alice_ip6))
|
||||
carol.succeed("ping -c 4 {}".format(bob_ip6))
|
||||
carol.wait_until_succeeds("ping -c 4 {}".format(alice_ip6))
|
||||
carol.wait_until_succeeds("ping -c 4 {}".format(bob_ip6))
|
||||
|
||||
alice.succeed("ping -c 4 {}".format(bob_ip6))
|
||||
bob.succeed("ping -c 4 {}".format(alice_ip6))
|
||||
alice.wait_until_succeeds("ping -c 4 {}".format(bob_ip6))
|
||||
bob.wait_until_succeeds("ping -c 4 {}".format(alice_ip6))
|
||||
|
||||
alice.wait_for_unit("httpd.service")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user