summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-06-21 16:18:24 +0000
committerNicolas Vigier <boklm@mageia.org>2011-06-21 16:18:24 +0000
commitfb686cdd364a21b4b7a3dccba4f2b3737e354dc5 (patch)
treed7ff60e2c5637cc86b0d32f74c9e6640e8b506b6
parenta0e2c8c32b8aa768d40dae508aa8828bee60cfbb (diff)
downloadmgatools-fb686cdd364a21b4b7a3dccba4f2b3737e354dc5.tar
mgatools-fb686cdd364a21b4b7a3dccba4f2b3737e354dc5.tar.gz
mgatools-fb686cdd364a21b4b7a3dccba4f2b3737e354dc5.tar.bz2
mgatools-fb686cdd364a21b4b7a3dccba4f2b3737e354dc5.tar.xz
mgatools-fb686cdd364a21b4b7a3dccba4f2b3737e354dc5.zip
send mail when package is moved
-rw-r--r--mga-move-update6
-rw-r--r--mgatools.conf9
2 files changed, 14 insertions, 1 deletions
diff --git a/mga-move-update b/mga-move-update
index 3d5e3d9..73a009b 100644
--- a/mga-move-update
+++ b/mga-move-update
@@ -60,5 +60,11 @@ do
movepkg "$distribdir/$distrorelease/$arch/media/debug/$section/updates_testing" "$distribdir/$distrorelease/$arch/media/debug/$section/updates/" "$srcpkg" "$mailcontent"
done
+if [ -z $dryrun ]
+then
+ cat "$mailcontent"
+else
+ /usr/bin/mail -s "mga-move-update $distrorelease $section $srcname" -S "from=moveupdate_mailfrom" "$moveupdate_mailto" < "$mailcontent"
+fi
rm -f "$mailcontent"
diff --git a/mgatools.conf b/mgatools.conf
index 8f8304d..aca64f4 100644
--- a/mgatools.conf
+++ b/mgatools.conf
@@ -1,5 +1,12 @@
moveupdate_allowed_group=mga-qa
-moveupdate_mailto=qa-report@ml.mageia.org
+moveupdate_mailto=sysadmin-reports@ml.mageia.org
+if [ -z $SUDO_USER ]
+then
+ requestuser="$USER"
+else
+ requestuser="$SUDO_USER"
+fi
+moveupdate_mailfrom="$requestuser <root@mageia.org>"
distribdir=/distrib/bootstrap/distrib
distroreleases='1'
distrosections='core nonfree tainted'