forked from freifunk-franken/firmware
fff-layer3-config: Disable SIGHUP during test mode
The SIGHUP signal is sent to a process if a hangup is detected on the controlling terminal. This might happen if the ssh session, from which the test mode was started, is disconnected. Because ssh session disconnects might happen due to network reconfiguration, aborting the test mode without restoring the old settings might make the device unreachable. Instead, disable the SIGHUP signal when test mode is activated, so the script is either killed by the user (after successful configuration) or the timer expires and the old settings are restored. Fixes: #141 Signed-off-by: Fabian Bläse <fabian@blaese.de> Reviewed-by: Christian Dresel <freifunk@dresel.systems> Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
This commit is contained in:
parent
ec94095599
commit
ffd00a93a7
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-layer3-config
|
PKG_NAME:=fff-layer3-config
|
||||||
PKG_RELEASE:=7
|
PKG_RELEASE:=8
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,7 @@ keep_changes() {
|
||||||
test_changes() {
|
test_changes() {
|
||||||
echo $$ > /tmp/configure-layer3-pid
|
echo $$ > /tmp/configure-layer3-pid
|
||||||
trap keep_changes SIGINT SIGTERM
|
trap keep_changes SIGINT SIGTERM
|
||||||
|
trap : SIGHUP
|
||||||
|
|
||||||
reload_services
|
reload_services
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue