Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openwrt] Enabled interfaces inadvertently get "disabled 0" #57

Closed
nemesifier opened this issue Jan 17, 2017 · 1 comment
Closed

[openwrt] Enabled interfaces inadvertently get "disabled 0" #57

nemesifier opened this issue Jan 17, 2017 · 1 comment
Assignees
Labels

Comments

@nemesifier
Copy link
Member

The following NetJSON DeviceConfiguration object:

{
    "interfaces": [
        {
            "type": "ethernet",
            "name": "eth0",
            "disabled": false
        }
    ]
}

Is converted to the following UCI configuration:

package network

config interface 'eth0'
	option disabled '0'
	option ifname 'eth0'
	option proto 'none'

But according to the OpenWRT network documentation the option disabled does not exist: the right keyword is enabled.

Strangely, disabling the interface:

{
    "interfaces": [
        {
            "type": "ethernet",
            "name": "eth0",
            "disabled": true
        }
    ]
}

returns a correct UCI configuration:

package network

config interface 'eth0'
	option enabled '0'
	option ifname 'eth0'
	option proto 'none'

It's just a minor inconsistency but it's quite disorienting.

@nemesifier nemesifier added the bug label Jan 17, 2017
@nemesifier nemesifier self-assigned this Jan 17, 2017
nemesifier added a commit that referenced this issue Jan 17, 2017
nemesifier added a commit that referenced this issue Jan 17, 2017
@nemesifier
Copy link
Member Author

Fixed by 88ef58c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant