Skip to content

Commit dcc59b1

Browse files
Update vlan checking:
Check if `vlan_id=` exists and if it has a value. This allows for an empty `vlan_id=` value. Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
1 parent ac00559 commit dcc59b1

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=$(cat /proc/cmdline | sed -n 's/.*vlan_id=\([0-9]*\).*/\1/p')
15+
if [ -n "$vlan_id" ]; then
1516
al="eth*.*"
1617
fi
1718

0 commit comments

Comments
 (0)