summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-10-21 20:00:02 +0200
committerGitHub <noreply@github.com>2021-10-21 20:00:02 +0200
commita0faf833bb91f8fc831850a27d31a84d58f76e75 (patch)
tree5698ec19e3054e4dd99bb8fa86f1e9888cebb125 /src
parent28d1f0252a10fe71abc8fdda1509295eeb97ee7c (diff)
parent67b3dd6b4715fef266eb47e68623944f8be617e0 (diff)
downloadvyos-1x-a0faf833bb91f8fc831850a27d31a84d58f76e75.tar.gz
vyos-1x-a0faf833bb91f8fc831850a27d31a84d58f76e75.zip
Merge pull request #1032 from ross211/dhclient-vyos-cleanup
dhclient hooks: T3920: avoid 'too many args' error when no vrf
Diffstat (limited to 'src')
-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