diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2004-10-06 15:07:39 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2004-10-06 15:07:39 +0000 |
commit | 61ec970df30325dbcd8c9d0f0e431dc793126656 (patch) | |
tree | 3534a7ab9d9a1e57651821184e6c28a25ee0e8de /src/scripts/Configure-eximon | |
parent | 0f4f2a8848bf9e6bb323ffb6a5581b088a940fd0 (diff) |
Start
Diffstat (limited to 'src/scripts/Configure-eximon')
-rwxr-xr-x | src/scripts/Configure-eximon | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/scripts/Configure-eximon b/src/scripts/Configure-eximon new file mode 100755 index 000000000..1ea74b7ea --- /dev/null +++ b/src/scripts/Configure-eximon @@ -0,0 +1,52 @@ +#! /bin/sh +# $Cambridge: exim/src/scripts/Configure-eximon,v 1.1 2004/10/06 15:07:40 ph10 Exp $ + +# Shell script to build the configurable part of the Exim monitor's start-up +# script. This is built from various configuration files. The final part is +# added in the Makefile, using various macros that are available at that stage. + +scripts=../scripts + +# First off, get the OS type, and check that there is a make file for it. + +os=`$scripts/os-type -generic` || exit 1 + +if test ! -r ../OS/Makefile-$os +then echo "" + echo "*** Sorry - operating system $os is not supported" + echo "*** See OS/Makefile-* for supported systems" 1>&2 + echo "" + exit 1; +fi + +# We also need the architecture type, in order to test for any architecture- +# specific configuration files. + +arch=`$scripts/arch-type` || exit 1 + +# Build a file called eximon in the current directory by joining +# the generic default configure file, the OS base configure file, and then +# local generic, OS-specific, architecture-specific, and OS+architecture- +# specific configurationfiles, if they exist. These files all contain variable +# definitions, with later definitions overriding earlier ones. + +echo "#!/bin/sh" > eximon +chmod a+x eximon + +# Concatenate the configuration files that exist + +for f in OS/eximon.conf-Default \ + OS/eximon.conf-$os \ + Local/eximon.conf \ + Local/eximon.conf-$os \ + Local/eximon.conf-$arch \ + Local/eximon.conf-$os-$arch +do if test -r ../$f + then echo "# From $f" + sed '/^#/d;/^[ ]*$/d' ../$f || exit 1 + echo "# End of $f" + echo "" + fi +done >> eximon || exit 1 + +# End of Configure-eximon |