move some freeswitch config files out of the freeswitch/ tree and symlink so
that they become configurable
Apply new PBX_* variable naming
fill_config: enable symlinks;
ignore template function 'strftime' because freeswith cfg uses that.
Change-Id: I97d3db87398c743637f7eb13629e21b149bcc8fa
Make sure that BTS 11 doesn't get sorted between BTS 1 and 2, because osmo-bsc
requires the BTS to be configured in numerical order.
Also makes sense as foreach loop ordering in general.
Change-Id: Ib06052fd71def3d4c869ee9b3dc4d02ba06267af
Make the message easy to understand at first glance, print what needs to
be done to regenerate the configs. Add an empty line before listing the
stale file that has been found, so it stands out from the (at this
point) less relevant path listings. It looks like the following now:
$ ./run.sh
using config file '/home/user/code/osmo-dev/net/config_2g3g_osmith'
on templates '/home/user/code/osmo-dev/net/tmpl_std'
with NET_DIR '/home/user/code/osmo-dev/net/osmith'
Stale: '/home/user/code/osmo-dev/net/tmpl_std/run.sh' is newer than 'run.sh'
WARNING: STALE CONFIGS - your net configs are older than the templates they should be based on!
* Hit enter to continue, and use the stale config files
* Hit ^C and run 'make regen' to regenerate your configs
Change-Id: If225e094619a07a228e0e2f337153ee18cdb420c
If there are multiple ${foo()} commands expanded in one iteration, there would
be offset mismatches because the changed string was used with regex offsets
from before the match. Re-run the regex after each change.
Change-Id: I69de60d840ff3ba115c37d1ede7ccbc8879c82eb
It's useful to include common parts in numerous cfg files, using the
${include(path)} command. So far they were called common_* and stored outside
of the templates dir (e.g. for logging). So far all files in a templates dir
are seen as templates, so the common files had to be stored in a different dir,
which is a bit senseless.
Allow storing them in the same dir with the templates: ignore all files
starting with 'common_'.
Change-Id: I74446dc0a7f51d4f231e8758a691abb675e87483
This patch indicates that we should rather use a proper templating python
library instead of re-inventing this stuff. But now that we're here...
Add a construct
${foreach(BTS)}
bts ${BTSn}
location_area_code ${BTSn_LAC}
${foreach_end}
that repeats for each BTS<nr> variable found, e.g.
BTS0_LAC=23
BTS1_LAC=24
BTS2_LAC=25
would result in three blocks of the above.
I am using this to avoid copy-pasting for configuring N BTSes for 35c3.
Change-Id: Ie1139a017f42cea5bf7ebbbe457bbc3bfe06944c
Allow all config files to use a new NET_DIR variable, which always
points to the network folder with the generated configs. We can use
this to place all temporary files (sockets, pid files, ...) there.
Change-Id: Idbdf478ebb9f0b2fcd860e5eff3c414a0a459561
This is the set of scripts I've written for myself over the years to easily
configure and run Osmocom core networks on my lab computer. I hope this will be
useful to others as well.