From 67b3dd6b4715fef266eb47e68623944f8be617e0 Mon Sep 17 00:00:00 2001 From: Ross Dougherty Date: Wed, 20 Oct 2021 23:50:51 +1100 Subject: dhclient hooks: T3920: avoid 'too many args' error when no vrf --- src/etc/dhcp/dhclient-exit-hooks.d/01-vyos-cleanup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/etc/dhcp') 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 -- cgit v1.2.3