Developing lightweight computation at the DSG edge
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Quick Mesh Project
qMp packages
Commits
499d6803
Commit
499d6803
authored
May 10, 2013
by
p4u
Browse files
Minor style changes in qmp_functions.sh
parent
8a67a63d
Changes
1
Hide whitespace changes
Inline
Side-by-side
packages/qmp-system/files/etc/qmp/qmp_functions.sh
View file @
499d6803
...
...
@@ -20,6 +20,7 @@
# the file called "COPYING".
#
# Contributors:
# Axel Neumann
# Pau Escrich <p4u@dabax.net>
# Simó Albert i Beltran
#
...
...
@@ -654,27 +655,25 @@ qmp_configure_rescue_ip_device()
}
qmp_configure_prepare
()
{
local
conf
=
$1
echo
"-----------------------"
echo
"Configuring networking"
echo
"-----------------------"
if
!
[
-f
/etc/config/
$conf
.orig
]
;
then
if
!
[
-f
/etc/config/
$conf
.orig
]
;
then
echo
"saving original config in: /etc/config/
$conf
.orig"
cp
/etc/config/
$conf
/etc/config/
$conf
.orig
fi
uci revert
$conf
echo
""
>
/etc/config/
$conf
}
qmp_configure_network
()
{
local
conf
=
"network"
qmp_configure_prepare
$conf
echo
"-----------------------"
echo
"Configuring networking"
echo
"-----------------------"
qmp_configure_prepare
$conf
if
qmp_uci_test qmp.interfaces.mesh_devices
&&
qmp_uci_test qmp.networks.mesh_protocol_vids
&&
qmp_uci_test qmp.networks.mesh_vid_offset
;
then
local
vids
=
"
$(
qmp_uci_get networks.mesh_protocol_vids |
awk
-F
':'
-v
RS
=
" "
'{print $2 + '
$(
uci
-q
get qmp.networks.mesh_vid_offset
)
'}'
)
"
...
...
@@ -703,9 +702,6 @@ qmp_configure_network() {
uci
set
$conf
.wan_ports.device
=
"
$switch_device
"
uci
set
$conf
.wan_ports.ports
=
"4 5t"
if
[[
-n
"
$vids
"
]]
;
then
for
vid
in
$vids
;
do
...
...
@@ -720,7 +716,6 @@ qmp_configure_network() {
done
fi
fi
uci
set
$conf
.loopback
=
"interface"
...
...
@@ -741,7 +736,6 @@ qmp_configure_network() {
uci
set
$conf
.
$viface
.proto
=
"dhcp"
done
local
primary_mesh_device
=
"
$(
qmp_get_primary_device
)
"
local
community_node_id
local
LSB_PRIM_MAC
=
"
$(
qmp_get_mac_for_dev
$primary_mesh_device
|
awk
-F
':'
'{print $6}'
)
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment