From 769e648d243223613d008276bcac18a164302ba8 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 8 Aug 2021 16:59:24 +0000 Subject: spectrumPackages: update execline backtick uses execline 2.8.0.0 changed how backtick's options work: * -i (exit with the program's error code on failure) and -n (chomp off a trailing newline from the captured output) are now the defaults. * -E has been introduced, which does importas automatically. -E is fantastic, because we followed every single use of backtick with importas. Even we didn't have -n before, it's okay that chomping will now be enabled from the default, because in all those cases, there won't be a trailing newline anyway. Message-Id: <20210808170439.1372425-1-hi@alyssa.is> Reviewed-by: sterni --- pkgs/os-specific/linux/spectrum/vm/net/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'pkgs/os-specific/linux/spectrum/vm/net/default.nix') diff --git a/pkgs/os-specific/linux/spectrum/vm/net/default.nix b/pkgs/os-specific/linux/spectrum/vm/net/default.nix index 5921b62fcf7..75c86b8f92c 100644 --- a/pkgs/os-specific/linux/spectrum/vm/net/default.nix +++ b/pkgs/os-specific/linux/spectrum/vm/net/default.nix @@ -54,12 +54,11 @@ runCommand "vm-net" rec { # Our IP is encoded in the NIC-specific portion of the # interface's MAC address. - backtick -i CLIENT_IP { + backtick -E CLIENT_IP { pipeline { ip -j link show $INTERFACE } pipeline { jq -r ".[0].address | split(\":\") | .[4:6] | \"0x\" + .[]" } xargs printf "100.64.%d.%d" } - importas -iu CLIENT_IP CLIENT_IP if { ip address add 169.254.0.1/32 dev $INTERFACE } if { ip link set $INTERFACE up } @@ -121,7 +120,7 @@ runCommand "vm-net" rec { ''; run = writeScript "connman-run" '' #! ${execline}/bin/execlineb -S0 - backtick -in HARDWARE_INTERFACES { + backtick -E HARDWARE_INTERFACES { pipeline { find -L /sys/class/net -mindepth 2 -maxdepth 2 -name address -print0 } @@ -132,7 +131,6 @@ runCommand "vm-net" rec { # Extract the interface names from the address file paths. awk -F/ "{if (NR > 1) printf \",\"; printf \"%s\", $5}" } - importas -iu HARDWARE_INTERFACES HARDWARE_INTERFACES ${connman}/bin/connmand -ni $HARDWARE_INTERFACES ''; -- cgit 1.4.1