Re: please explain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Deepak Oberoi wrote:
can some one help me understand these few lines of
code please?
::::::::::::
::::::::::::
::::::::::::
make all -C /etc/mail -s

Run "make" silently in directory /etc/mail (see "man make")

35: else
36: for i in virtusertable access domaintable
mailertable ; do

For each of the files ( virtusertable access domaintable mailertable )

37: if [ -f /etc/mail/$i ] ; then

If the file exists in directory /etc/mail

38: makemap hash /etc/mail/$i < /etc/mail/$i

Use the makemap program (see "man makemap") to "compile" the text file into a database format that sendmail can use directly.


39: fi
40: done
41: fi

End the if and loop constructs.

42: /usr/bin/newaliases > /dev/null 2>&1

Rebuild the aliases database from the text file.

43: daemon /usr/sbin/sendmail $([ "x$DAEMON" = xyes ]
&& echo -bd) \

This initscript has previously included the file /etc/sysconfig/sendmail, which may have set the DAEMON variable. If it did, start sendmail with parameter "-bd" (have sendmail listen for incoming SMTP mail connections). "daemon" is a function defined in /etc/rc.d/init.d/functions to start programs nicely in the background.


44: $([ -n "$QUEUE" ] && echo -q$QUEUE)

If the QUEUE variable is set, add -q$QUEUE to the parameters used when starting sendmail. Typically used to have sendmail process the mail queue every 20 or 30 minutes.


$SENDMAIL_OPTARG

Add any optional parameters required.

45: RETVAL=$?

Set the variable RETVAL to the exit status of the "daemon" command. If the result is zero, all is well.


46: echo
47: [ $RETVAL -eq 0 ] && touch
/var/lock/subsys/sendmail

If sendmail appears to have started properly, create an empty file /var/lock/subsys/sendmail to indicate that sendmail is running.


Paul.



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux