Hey all,

I'm using procedurally-generated alias files from a database, and distributing them with puppet, and would like to have postalias check the files for duplicate entries and/or other errors before I install them. I'd like to use the same program used to install the DB, rather than hacking a validator together with perl or something.

As an example, an empty left-hand

foo:

would be an error I want to catch. I want to catch duplicate items, as well. I'd rather not parse stderr for this.

There seem to be two obvious missing features:

First, the ability to not output a file, but just parse the existing one.

Second, the abiity to generate errors (as in, exit code errors) rather than warnings. This could be added to postfix without changing existing behavior.

Is there any good way that people would recommend parsing alias and map files? The closest I've come would be counting the number of lines of output to stderr, rather than looking at exit code, but that still seems contrived.

Perhaps this is best for the manpage: what errors *will* cause actual non-zero exit codes?

-Dan

--

--------Dan Mahoney--------
Techie,  Sysadmin,  WebGeek
Gushi on efnet/undernet IRC
FB:  fb.com/DanielMahoneyIV
LI:   linkedin.com/in/gushi
Site:  http://www.gushi.org
---------------------------

Reply via email to