summaryrefslogtreecommitdiff
path: root/src/etc
diff options
context:
space:
mode:
authorRoss Dougherty <ross@dougherty.id.au>2021-10-20 23:50:51 +1100
committerGitHub <noreply@github.com>2021-10-20 23:50:51 +1100
commit67b3dd6b4715fef266eb47e68623944f8be617e0 (patch)
treeec40002a9ee9700972109c6010b6422e27b33284 /src/etc
parent4d99d91829fa06a3a56299c6ec6936a5c8efc796 (diff)
downloadvyos-1x-67b3dd6b4715fef266eb47e68623944f8be617e0.tar.gz
vyos-1x-67b3dd6b4715fef266eb47e68623944f8be617e0.zip
dhclient hooks: T3920: avoid 'too many args' error when no vrf
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/dhcp/dhclient-exit-hooks.d/01-vyos-cleanup2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/etc/dhcp/dhclient-exit-hooks.d/01-vyos-cleanup b/src/etc/dhcp/dhclient-exit-hooks.d/01-vyos-cleanup
index edb7c7b27..f060c6ee8 100644
--- a/src/etc/dhcp/dhclient-exit-hooks.d/01-vyos-cleanup
+++ b/src/etc/dhcp/dhclient-exit-hooks.d/01-vyos-cleanup
@@ -19,7 +19,7 @@ if [[ $reason =~ (EXPIRE|FAIL|RELEASE|STOP) ]]; then
for router in $old_routers; do
# check if we are bound to a VRF
local vrf_name=$(basename /sys/class/net/${interface}/upper_* | sed -e 's/upper_//')
- if [ -n $vrf_name ]; then
+ if [ "$vrf_name" != "*" ]; then
vrf="vrf $vrf_name"
fi