#597807 sendmail: m4 sanity checking file_check macro (source included)

#597807#5
Date:
2010-09-23 08:33:21 UTC
From:
To:
We should add more sanity checking to our sendmail configs. Here's two macros
that cause a sendmail config build to fail with a usable error when a file
or directory goes missing:


dnl sanity checking macros

define(`fatal_error', `
errprint(__line__`: fatal error: $*
')
m4exit(`1')
')
define(`file_check', `
syscmd(`ls  $1 >/dev/null ')
ifelse(sysval, `0', `', `fatal_error(`file not found "$1" for $2')' )
')

file_check(QUEUE_DIR, `QUEUE_DIR')
dnl end sanity


Thanks,
Patrick