Skip to content

Commit 213c2c7

Browse files
Update vlan checking: (#171)
## Description <!--- Please describe what this PR is going to change --> Check if `vlan_id=` exists and if it has a value. This allows for an empty `vlan_id=` value. ## Why is this needed <!--- Link to issue you have raised --> Fixes: # ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## How are existing users impacted? What migration steps/scripts do we need? <!--- Fixes a bug, unblocks installation, removes a component of the stack etc --> <!--- Requires a DB migration script, etc. --> ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
2 parents ac00559 + 446e2f4 commit 213c2c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

files/dhcp.sh

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

14-
if grep "vlan_id" /proc/cmdline; then
14+
vlan_id=$(sed -n 's/.*vlan_id=\([0-9]*\).*/\1/p' /proc/cmdline)
15+
if [ -n "$vlan_id" ]; then
1516
al="eth*.*"
1617
fi
1718

0 commit comments

Comments
 (0)