Skip to content

Commit afa8653

Browse files
authored
Update sed command for getting vlan_id from cmdline: (#181)
## Description This fixes an issue where "vlan_id" is a substring. For example: "thisisavlan_id=123". This example will be treated as if the vlan_id was not set at all. ## Why is this needed Fixes: #180 ## How Has This Been Tested? ## How are existing users impacted? What migration steps/scripts do we need? ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
2 parents 1c438a9 + cd752aa commit afa8653

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

files/dhcp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ run_dhcp_client() {
1111
one_shot="$1"
1212
al="eth*"
1313

14-
vlan_id=$(sed -n 's/.*vlan_id=\([0-9]*\).*/\1/p' /proc/cmdline)
14+
vlan_id=$(sed -n 's/.* vlan_id=\([0-9]*\).*/\1/p' /proc/cmdline)
1515
if [ -n "$vlan_id" ]; then
1616
al="eth*.*"
1717
fi

0 commit comments

Comments
 (0)