Name: resin-network-config
Owner: Resin.io
Description: DEPRECATED. Handle resin images network configuration.
Created: 2015-05-18 12:42:13.0
Updated: 2016-11-14 00:14:07.0
Pushed: 2015-08-31 23:21:55.0
Size: 196
Language: CoffeeScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
DEPRECATED in favor of https://github.com/resin-io/resin-device-config
Handle resin images network configuration.
Install resin-network-config
by running:
m install --save resin-network-config
Get network related configuration files.
The function accepts an optional options
object which can have the following properties:
options.wifiSsid
, a string that represents the wifi ssid to connect to. If this property is not defined, only ethernet connection will be configured for the device.options.wifiKey
, a string that represents the wifi key to use with the defined wifi ssid. If this property is not defined, then the wifi connection will be configured without a passphrase.orkConfig = require('resin-network-config')
s = networkConfig.getFiles
wifiSsid: 'foobar'
wifiKey: 'hello'
ole.log(files)
'network/settings': '''
[global]
OfflineMode=false
[WiFi]
Enable=true
Tethering=false
[Wired]
Enable=true
Tethering=false
[Bluetooth]
Enable=true
Tethering=false
''',
'network/network.config': '''
[service_home_ethernet]
Type = ethernet
Nameservers = 8.8.8.8,8.8.4.4
[service_home_wifi]
Type = wifi
Name = foobar
Passphrase = hello
Nameservers = 8.8.8.8,8.8.4.4
'''
Run the test suite by doing:
lp test
Before submitting a PR, please make sure that you include tests, and that coffeelint runs without any warning:
lp lint
If you're having any problem, please raise an issue on GitHub.
The project is licensed under the MIT license.