#! /bin/bash
# $Header: /global/src/etc/cl-manage-scripts/patches/RCS/P-exim4-mailname,v 1.1 2009/03/19 09:32:56 pb22 Exp $
#
# Command to check that (debian) exim(4) is setup to use cl.cam.ac.uk as the mail name
#
# patch-file operation = shell
# patch-file distmatches = Ubuntu|Debian
# patch-file matches = ^cl.cam.ac.uk$
# patch-file filename = /etc/mailname

file=$cl_patch_file_File
suff=$cl_patch_file_suff
data="$cl_patch_file_matches"
data=`echo "$data" | sed 's/^^//;s/$$//'`

# Save the original (pre Patch) version
test -e $file$suff || mv -f $file $file$suff
echo "$data" > $file

# data changed -- reconfig
dpkg-reconfigure --default-priority  exim4-config
