From ae2473c2ca07cf5173a3dab22bc64e7b135ef848 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 21 Mar 2014 18:08:16 +0100 Subject: [PATCH] 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. --- contrib/sysmobts.service | 1 + src/osmo-bts-sysmo/main.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/sysmobts.service b/contrib/sysmobts.service index cf6aa1aa1..9ac51e909 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 74ee47f8c..921103e61 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);