[Mageia-sysadm] [1810] Add workaround to not send mail from schedbot user

nicolas vigier boklm at mars-attacks.org
Tue Jul 5 16:55:03 CEST 2011


On Tue, 05 Jul 2011, root at mageia.org wrote:

> Revision: 1810
> Author:   dmorgan
> Date:     2011-07-05 16:42:43 +0200 (Tue, 05 Jul 2011)
> Log Message:
> -----------
> Add workaround to not send mail from schedbot user
> We will be able to remove it as soon as we will use an other  send mail hook

Yes it would be better to do that in the sendmail hook directly (like for
cia.vc hook).

We are currently using SVN::Notify::Config "YAML-based configuration
wrapper on SVN::Notify". I think we should replace this with a shell
script using the svnnotify command, or perl script using SVN::Notify.
This would also allow us to add the author in the from.

> 
> Modified Paths:
> --------------
>     puppet/modules/subversion/templates/hook_commit.sh
> 
> Modified: puppet/modules/subversion/templates/hook_commit.sh
> ===================================================================
> --- puppet/modules/subversion/templates/hook_commit.sh	2011-07-05 00:02:55 UTC (rev 1809)
> +++ puppet/modules/subversion/templates/hook_commit.sh	2011-07-05 14:42:43 UTC (rev 1810)
> @@ -1,5 +1,20 @@
>  #!/bin/sh
> -for script in $0.d/*; do
> +
> +REP="$1"
> +TXN="$2"
> +
> +author=$(svnlook author -t "$TXN" "$REP")
> +
> +# This is here only the time we use hook_sendmail.pl
> +# We will be able to remove it when updating to a better send mail hook
> +
> +if [ "$author" = 'schedbot' ]; then
> +  LIST= `ls $0.d/* | grep -v hook_sendmail.pl `

the name of the script is send_mail, not hook_sendmail.pl.



More information about the Mageia-sysadm mailing list