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
03855c65
Commit
03855c65
authored
Dec 17, 2013
by
Simó Albert i Beltran
Browse files
Restart bmx6 if hostname is changed with configure_system. Closes #273.
parent
517f7cea
Changes
2
Hide whitespace changes
Inline
Side-by-side
packages/qmp-system/files/etc/qmp/qmp_control.sh
View file @
03855c65
...
...
@@ -67,6 +67,7 @@ configure_network() {
configure_system
()
{
qmp_configure_system
qmp_bmx6_reload
/etc/init.d/uhttpd restart
}
...
...
packages/qmp-system/files/etc/qmp/qmp_network.sh
View file @
03855c65
...
...
@@ -263,3 +263,26 @@ qmp_configure_lan_v6() {
echo
"Done"
}
qmp_bmx6_reload
()
{
local
restart_bmx6
=
false
local
bmx6_name
=
"
$(
bmx6
-c
status |
awk
'END{split($4,f,"."); print f[1]}'
)
"
local
current_hostname
=
"
$(
cat
/proc/sys/kernel/hostname
)
"
if
[
"
$current_hostname
"
!=
"
$bmx6_name
"
]
then
restart_bmx6
=
true
fi
if
!
$restart_bmx6
then
if
!
bmx6
-c
--configReload
then
restart_bmx6
=
true
fi
fi
if
$restart_bmx6
then
/etc/init.d/bmx6 restart
fi
}
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