On Thu, Apr 15, 2004 at 05:56:28PM +0200, Jeroen van Wolffelaar wrote: > /etc/aliases is the source file for the system mail aliases (e.g., > postmaster, usenet, etc.), it is the one which the sysadmin and postinst > scripts may edit. After /etc/aliases is edited the program or human > editing it must call newaliases. All MTA packages must come with a > newaliases program, even if it does nothing, but older MTA packages did > not do this so programs should not fail if newaliases cannot be found. > Note that because of this, all MTA packages must have Provides, > Conflicts and Replaces: mail-transport-agent control file fields.
That's great, but how can we possibly do that? If you know what path newaliases has, you can simply do if [ -x $NEWALIASES ] $NEWALIASES I suppose we could do something like: for i in /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin; do if [ -x $i/newaliases] $i/newaliases done but that's pretty ugly. -- "Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain