aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-03-21 18:08:16 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-03-21 18:10:12 +0100
commitae2473c2ca07cf5173a3dab22bc64e7b135ef848 (patch)
treed431fefb61fec2ee0b7efa639064dce36cd5f035
parentfb067905d5e4feb73a41556b798640a8b0f01b77 (diff)
systemd: Do not restart with a broken config file or such
Only restart in case of a crash or the exit(42) when the OML/RSL link is going down.
-rw-r--r--contrib/sysmobts.service1
-rw-r--r--src/osmo-bts-sysmo/main.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/contrib/sysmobts.service b/contrib/sysmobts.service
index cf6aa1a..9ac51e9 100644
--- a/contrib/sysmobts.service
+++ b/contrib/sysmobts.service
@@ -9,6 +9,7 @@ ExecStopPost=/bin/sh -c 'echo 0 > /sys/class/leds/activity_led/brightness'
ExecStopPost=/bin/sh -c 'cat /lib/firmware/sysmobts-v?.bit > /dev/fpgadl_par0 ; sleep 3s; cat /lib/firmware/sysmobts-v?.out > /dev/dspdl_dm644x_0; sleep 1s'
Restart=always
RestartSec=2
+RestartPreventExitStatus=1
# The msg queues must be read fast enough
CPUSchedulingPolicy=rr
diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c
index 74ee47f..921103e 100644
--- a/src/osmo-bts-sysmo/main.c
+++ b/src/osmo-bts-sysmo/main.c
@@ -351,7 +351,7 @@ int main(int argc, char **argv)
if (pcu_sock_init()) {
fprintf(stderr, "PCU L1 socket failed\n");
- exit(-1);
+ exit(1);
}
signal(SIGINT, &signal_handler);