Re: [desktop] Installation of mail server by default
On Sat, Mar 29, 2003 at 12:51:56AM -0500, Anthony DeRobertis wrote:
> On Fri, 2003-03-28 at 03:37, Andreas Metzler wrote:
>
> > I kind of doubt that it is feasible writing an init-script that works
> > for all MTAs. Take a look at the init-scripts for sendmail and exim4.
>
> You don't have to. Try (given alternatives were implemented, of course):
>
> # untested code to check if we're the current mailer.
> CURRENT_MAILER="`update-alternatives --list sendmail`"
> if [ "$CURRENT_MAILER" != "$DAEMON"]; then
> exit 0 # we're not the chosen mailer.
> fi
It looks good but --list does not give output you expected in above
escript. Use --display with grep and sed. Something like :-)
CURRENT_MAILER="`update-alternatives --display sendmail | \
grep '^Current' | \
sed 's,^.*/,/,'`"
HTH.
--
~\^o^/~~~ ~\^.^/~~~ ~\^*^/~~~ ~\^_^/~~~ ~\^+^/~~~ ~\^:^/~~~ ~\^v^/~~~ +++++
Osamu Aoki <osamu@debian.org> Cupertino CA USA, GPG-key: A8061F32
.''`. Debian Reference: post-installation user's guide for non-developers
: :' : http://qref.sf.net and http://people.debian.org/~osamu
`. `' "Our Priorities are Our Users and Free Software" --- Social Contract
Reply to: