3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #38094 from volth/patch-120

nixos/network-scripted: print error details
This commit is contained in:
Matthew Justin Bauer 2018-04-08 21:27:38 -05:00 committed by GitHub
commit 9c66871784
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -191,7 +191,7 @@ let
if out=$(ip addr add "${cidr}" dev "${i.name}" 2>&1); then
echo "done"
elif ! echo "$out" | grep "File exists" >/dev/null 2>&1; then
echo "failed"
echo "'ip addr add "${cidr}" dev "${i.name}"' failed: $out"
exit 1
fi
''
@ -212,7 +212,7 @@ let
if out=$(ip route add "${cidr}" ${options} ${via} dev "${i.name}" 2>&1); then
echo "done"
elif ! echo "$out" | grep "File exists" >/dev/null 2>&1; then
echo "failed"
echo "'ip route add "${cidr}" ${options} ${via} dev "${i.name}"' failed: $out"
exit 1
fi
''