From 8e104ac413e92439c37fd097063fe80b42160b0e Mon Sep 17 00:00:00 2001 From: Jan Luebbe Date: Wed, 24 Jun 2015 14:12:30 +0200 Subject: [PATCH] sysmocom-configure: add simple framework to run configuration scripts The configuration scripts are named for the systemd units for which they generate configuration files. The generator causes them to run before those units are started. --- recipes-apps/tasks/task-sysmocom-tools.bb | 1 + .../files/multi-user.target.sh | 12 ++++++++ .../files/osmo-bsc.service.sh | 12 ++++++++ .../files/sysmocom-bsc/multi-user.target.sh | 11 ++++++++ .../files/sysmocom-generator | 28 +++++++++++++++++++ .../sysmocom-configure_1.0.bb | 20 +++++++++++++ 6 files changed, 84 insertions(+) create mode 100644 recipes-config/sysmocom-configure/files/multi-user.target.sh create mode 100644 recipes-config/sysmocom-configure/files/osmo-bsc.service.sh create mode 100644 recipes-config/sysmocom-configure/files/sysmocom-bsc/multi-user.target.sh create mode 100755 recipes-config/sysmocom-configure/files/sysmocom-generator create mode 100644 recipes-config/sysmocom-configure/sysmocom-configure_1.0.bb diff --git a/recipes-apps/tasks/task-sysmocom-tools.bb b/recipes-apps/tasks/task-sysmocom-tools.bb index 96e6307..1bc7559 100644 --- a/recipes-apps/tasks/task-sysmocom-tools.bb +++ b/recipes-apps/tasks/task-sysmocom-tools.bb @@ -17,4 +17,5 @@ RDEPENDS_${PN} = "\ sysmocom-backup \ sysmocom-backup-default \ sysmocom-systemd \ + sysmocom-configure \ " diff --git a/recipes-config/sysmocom-configure/files/multi-user.target.sh b/recipes-config/sysmocom-configure/files/multi-user.target.sh new file mode 100644 index 0000000..3a10995 --- /dev/null +++ b/recipes-config/sysmocom-configure/files/multi-user.target.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +set -eu + +TEST_VALUE="default" + +. /slot/system.conf + +cat >/etc/symocom/test.cfg </etc/osmocom/osmo-bsc.cfg </etc/sysmocom/test.cfg <$1/${UNIT//./-}-configure.service <