Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't run openwrt hotplug script if $DEVICE is unset
Turns out hotplug scripts don't always set $DEVICE, which can leave interfaces in an unconfigured state. Thanks to David Ell for reporting the bug. Fixes #69. Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
- Loading branch information
d0ac824
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks! Should we add a comment that this should not happen, but when it does it should not have catastrophic side effects? Or just do a
This assumes that empty DEVICE is not the desired bahaviour...
d0ac824
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d0ac824
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it is, but it would have saved David Ell some time during debugging... Also your elegant solution while not doing anything stupid, might end up not doing anything if ifup comes without a DEVICE, but doing that silently... ?
I am quite fine with your solution.