mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 10:23:29 +00:00
nixos/clatd: use clat-dev
if it exists in settings
Otherwise, fallback to the default interface name `clat`.
This commit is contained in:
parent
7665f6cb34
commit
7b87a185a8
@ -86,7 +86,7 @@ in
|
||||
type = "basic";
|
||||
# https://github.com/toreanderson/clatd/blob/master/scripts/clatd.networkmanager
|
||||
source = pkgs.writeShellScript "restart-clatd" ''
|
||||
[ "$DEVICE_IFACE" = "clat" ] && exit 0
|
||||
[ "$DEVICE_IFACE" = "${cfg.settings.clat-dev or "clat"}" ] && exit 0
|
||||
[ "$2" != "up" ] && [ "$2" != "down" ] && exit 0
|
||||
${pkgs.systemd}/bin/systemctl restart clatd.service
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user