3 # Copyright (c) The Exim Maintainters 2022
4 # SPDX-License-Identifier: GPL-2.0-or-later
6 # Shell script to build the configurable part of the Exim monitor's start-up
7 # script. This is built from various configuration files. The final part is
8 # added in the Makefile, using various macros that are available at that stage.
12 # First off, get the OS type, and check that there is a make file for it.
14 os=`$scripts/os-type -generic` || exit 1
16 if test ! -r ../OS/Makefile-$os
18 echo "*** Sorry - operating system $os is not supported"
19 echo "*** See OS/Makefile-* for supported systems" 1>&2
24 # We also need the architecture type, in order to test for any architecture-
25 # specific configuration files.
27 arch=`$scripts/arch-type` || exit 1
29 # Build a file called eximon in the current directory by joining
30 # the generic default configure file, the OS base configure file, and then
31 # local generic, OS-specific, architecture-specific, and OS+architecture-
32 # specific configurationfiles, if they exist. These files all contain variable
33 # definitions, with later definitions overriding earlier ones.
35 echo "#!/bin/sh" > eximon
38 # Concatenate the configuration files that exist
40 for f in OS/eximon.conf-Default \
43 Local/eximon.conf-$os \
44 Local/eximon.conf-$arch \
45 Local/eximon.conf-$os-$arch
48 sed '/^#/d;/^[ ]*$/d' ../$f || exit 1
52 done >> eximon || exit 1
54 # End of Configure-eximon