From 2ae26ee3fa453c514bf280dfa726211757b1906c Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 15 Sep 2012 16:34:21 +0200 Subject: [PATCH] openbsc: Improve the init scripts, do not write counters Make the start/stop of the NITB, BSC and MGCP HW work, remove the force-reload option as it didn't do anything and omit writing counters into the database. --- recipes-osmocom/openbsc/openbsc.inc | 2 +- recipes-osmocom/openbsc/openbsc/osmo-bsc.init | 9 ++++----- recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init | 9 ++++----- recipes-osmocom/openbsc/openbsc/osmo-nitb.init | 9 ++++----- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/recipes-osmocom/openbsc/openbsc.inc b/recipes-osmocom/openbsc/openbsc.inc index 1f71e4d6d8..a372005753 100644 --- a/recipes-osmocom/openbsc/openbsc.inc +++ b/recipes-osmocom/openbsc/openbsc.inc @@ -9,7 +9,7 @@ RDEPENDS_osmo-nitb = "libdbd-sqlite3" SRC_URI = "file://osmo-nitb.init \ file://osmo-bsc_mgcp.init \ file://osmo-bsc.init" -INC_PR = "r12.${META_TELEPHONY_OSMO_INC}" +INC_PR = "r13.${META_TELEPHONY_OSMO_INC}" EXTRA_OECONF += " --enable-nat --enable-osmo-bsc " diff --git a/recipes-osmocom/openbsc/openbsc/osmo-bsc.init b/recipes-osmocom/openbsc/openbsc/osmo-bsc.init index dd0479a77c..c75e2db946 100755 --- a/recipes-osmocom/openbsc/openbsc/osmo-bsc.init +++ b/recipes-osmocom/openbsc/openbsc/osmo-bsc.init @@ -34,14 +34,13 @@ case "$1" in start-stop-daemon -K -x "$DAEMON" echo "$NAME." ;; - restart|force-reload) - echo -n "Restarting $DESC: " - start-stop-daemon -K -x "$DAEMON" - echo "$NAME." + restart) + $0 stop + $0 start ;; *) N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|restart|force-reload}" >&2 + echo "Usage: $N {start|stop|restart}" >&2 exit 1 ;; esac diff --git a/recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init b/recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init index bfddac962a..badd954f07 100755 --- a/recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init +++ b/recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init @@ -34,14 +34,13 @@ case "$1" in start-stop-daemon -K -x "$DAEMON" echo "$NAME." ;; - restart|force-reload) - echo -n "Restarting $DESC: " - start-stop-daemon -K -x "$DAEMON" - echo "$NAME." + restart) + $0 stop + $0 start ;; *) N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|restart|force-reload}" >&2 + echo "Usage: $N {start|stop|restart}" >&2 exit 1 ;; esac diff --git a/recipes-osmocom/openbsc/openbsc/osmo-nitb.init b/recipes-osmocom/openbsc/openbsc/osmo-nitb.init index 86c7f757c9..bd74cc0607 100755 --- a/recipes-osmocom/openbsc/openbsc/osmo-nitb.init +++ b/recipes-osmocom/openbsc/openbsc/osmo-nitb.init @@ -11,7 +11,7 @@ DAEMON=/usr/bin/osmo-nitb NAME=osmo-nitb DESC="Osmocom GSM Network in the Box" -NORMAL_ARGS="-D -c /etc/osmocom/osmo-nitb.cfg -l /var/lib/osmocom/hlr.sqlite3" +NORMAL_ARGS="-C -D -c /etc/osmocom/osmo-nitb.cfg -l /var/lib/osmocom/hlr.sqlite3" OSMOBTS_EXTRA_ARGS="" NO_START=1 @@ -35,13 +35,12 @@ case "$1" in echo "$NAME." ;; restart|force-reload) - echo -n "Restarting $DESC: " - start-stop-daemon -K -x "$DAEMON" - echo "$NAME." + $0 stop + $0 start ;; *) N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|restart|force-reload}" >&2 + echo "Usage: $N {start|stop|restart}" >&2 exit 1 ;; esac