From 0c5a94f1e629bfbbe905d82ab9c4c391d636ce6b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 17 Apr 2018 19:49:36 +0200 Subject: persistent macs on yggdrasil --- custom/tinc/yggdrasil.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'custom') diff --git a/custom/tinc/yggdrasil.nix b/custom/tinc/yggdrasil.nix index 91c1add8..2da48486 100644 --- a/custom/tinc/yggdrasil.nix +++ b/custom/tinc/yggdrasil.nix @@ -80,6 +80,13 @@ in { ${optionalString cfg.connect "ConnectTo = ymir"} ''; scripts = { + "tinc-up" = '' + #!${pkgs.stdenv.shell} + + set -e + MACFILE="/var/db/$NETNAME.mac" + [ -e $MACFILE ] && ip link set dev $INTERFACE address `cat $MACFILE` || cat /sys/class/net/$INTERFACE/address >$MACFILE + ''; "hosts/heimdallr-up" = '' #!${pkgs.stdenv.shell} -- cgit v1.2.3