From ca8cef1660ad89ab488a22dc50eeb7cd77222c6e Mon Sep 17 00:00:00 2001 From: Ivy Foster Date: Thu, 1 Sep 2016 18:50:20 -0500 Subject: Add $MBLAZE environment variable to set profile location As a side benefit, all callers of blaze822_home_file need only pass the filename, so the base directory is set in only one place. --- mgenmid.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mgenmid.c') diff --git a/mgenmid.c b/mgenmid.c index 1e57210..a9b878b 100644 --- a/mgenmid.c +++ b/mgenmid.c @@ -31,7 +31,7 @@ int main() char hostbuf[1024]; char *host = 0; - char *f = blaze822_home_file(".mblaze/profile"); + char *f = blaze822_home_file("profile"); struct message *config = blaze822(f); if (config) // try FQDN: first @@ -74,7 +74,8 @@ int main() if (!host) { fprintf(stderr, "mgenmid: failed to find a FQDN for the Message-ID.\n" - " Define 'FQDN:' or 'Local-Mailbox:' in ~/.mblaze/profile\n" + " Define 'FQDN:' or 'Local-Mailbox:' in" + " ${MBLAZE:-$HOME/.mblaze}/profile\n" " or add a FQDN to /etc/hosts.\n"); exit(1); } -- cgit 1.4.1