Skip to content

Commit e32da72

Browse files
author
Ritwick DSouza
committed
[raspbian] Updated documentations examples
1 parent ea3d408 commit e32da72

1 file changed

Lines changed: 17 additions & 25 deletions

File tree

docs/source/backends/raspbian.rst

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,6 @@ Code example:
3434
"proto": "static",
3535
"family": "ipv4"
3636
},
37-
{
38-
"address": "192.168.2.1",
39-
"mask": 24,
40-
"proto": "static",
41-
"family": "ipv4"
42-
},
4337
{
4438
"address": "fd87::1",
4539
"mask": 128,
@@ -60,9 +54,6 @@ Will return the following output::
6054
iface eth0 inet static
6155
address 192.168.1.1
6256
netmask 255.255.255.0
63-
iface eth0 inet static
64-
address 192.168.2.1
65-
netmask 255.255.255.0
6657
iface eth0 inet6 static
6758
address fd87::1
6859
netmask 128
@@ -150,7 +141,7 @@ The following *configuration dictionary*:
150141
151142
{
152143
"general": {
153-
"hostname": "routerA",
144+
"hostname": "RaspberryPi",
154145
"timezone": "UTC"
155146
}
156147
}
@@ -159,7 +150,7 @@ Will be rendered as follows::
159150

160151
# config: /etc/hostname
161152

162-
routerA
153+
RaspberryPi
163154

164155
# script: /scripts/general.sh
165156

@@ -236,15 +227,9 @@ DNS Servers and Search Domains
236227
DNS servers can be set using ``dns_servers``, while search domains can be set using
237228
``dns_search``.
238229

239-
If specified, these values will be automatically added in every interface which has
240-
at least one static ip address; interfaces which have no ip address configured or are using
241-
dynamic ip address configuration won't get the ``dns`` option in the UCI output, eg:
242-
243230
.. code-block:: python
244231
245232
{
246-
"dns_servers": ["10.11.12.13", "8.8.8.8"],
247-
"dns_search": ["openwisp.org", "netjson.org"],
248233
"interfaces": [
249234
{
250235
"name": "eth0",
@@ -268,10 +253,17 @@ dynamic ip address configuration won't get the ``dns`` option in the UCI output,
268253
}
269254
]
270255
}
271-
]
256+
],
257+
"dns_servers": [
258+
"10.11.12.13",
259+
"8.8.8.8"
260+
],
261+
"dns_search": [
262+
"openwisp.org",
263+
"netjson.org"],
272264
}
273265
274-
Will return the following UCI output::
266+
Will return the following output::
275267

276268
# config: /etc/network/interfaces
277269

@@ -348,11 +340,11 @@ The following *configuration dictionary*:
348340
{
349341
"interfaces": [
350342
{
351-
"name": "lan_bridge",
343+
"name": "lan",
352344
"type": "bridge",
353345
"bridge_members": [
354-
"eth0:0",
355-
"eth0:1"
346+
"eth0",
347+
"eth1"
356348
],
357349
"addresses": [
358350
{
@@ -370,11 +362,11 @@ Will be rendered as follows::
370362

371363
# config: /etc/network/interfaces
372364

373-
auto lan_bridge
374-
iface lan_bridge inet static
365+
auto lan
366+
iface lan inet static
375367
address 172.17.0.2
376368
netmask 255.255.255.0
377-
bridge_ports eth0:0 eth0:1
369+
bridge_ports eth0 eth1
378370

379371
Wireless Settings
380372
-----------------

0 commit comments

Comments
 (0)