mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-18 07:29:23 +03:00
nixos/network-scripted: print error details
This commit is contained in:
parent
cef9812b93
commit
a6c8e48840
1 changed files with 2 additions and 2 deletions
|
@ -192,7 +192,7 @@ let
|
||||||
if out=$(ip addr add "${cidr}" dev "${i.name}" 2>&1); then
|
if out=$(ip addr add "${cidr}" dev "${i.name}" 2>&1); then
|
||||||
echo "done"
|
echo "done"
|
||||||
elif ! echo "$out" | grep "File exists" >/dev/null 2>&1; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
''
|
''
|
||||||
|
@ -213,7 +213,7 @@ let
|
||||||
if out=$(ip route add "${cidr}" ${options} ${via} dev "${i.name}" 2>&1); then
|
if out=$(ip route add "${cidr}" ${options} ${via} dev "${i.name}" 2>&1); then
|
||||||
echo "done"
|
echo "done"
|
||||||
elif ! echo "$out" | grep "File exists" >/dev/null 2>&1; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
''
|
''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue