aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mga-advisories/templates/adv-move-pkg
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-08-04 09:30:44 +0100
committerColin Guthrie <colin@mageia.org>2014-08-04 09:34:05 +0100
commitc2b12fe4ffb6aea9e37dc697cbba8cdf51f60fac (patch)
treefa2c3edb35b4a405129f240b033702581df0c8fa /modules/mga-advisories/templates/adv-move-pkg
parent43c76694387ef750bf838ccaec577746f31b825a (diff)
downloadpuppet-c2b12fe4ffb6aea9e37dc697cbba8cdf51f60fac.tar
puppet-c2b12fe4ffb6aea9e37dc697cbba8cdf51f60fac.tar.gz
puppet-c2b12fe4ffb6aea9e37dc697cbba8cdf51f60fac.tar.bz2
puppet-c2b12fe4ffb6aea9e37dc697cbba8cdf51f60fac.tar.xz
puppet-c2b12fe4ffb6aea9e37dc697cbba8cdf51f60fac.zip
mga-advisories: Add configuration for running mgaadv in a way which moves packages.
This adds an appropriate wrapper script to run the move script as root (which is needed) while keeping the rest running as the mga-advisories user. Disable the cron script for now as we will move over to running the full process but we should test it a bit first.
Diffstat (limited to 'modules/mga-advisories/templates/adv-move-pkg')
-rw-r--r--modules/mga-advisories/templates/adv-move-pkg8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/mga-advisories/templates/adv-move-pkg b/modules/mga-advisories/templates/adv-move-pkg
new file mode 100644
index 00000000..39d246ec
--- /dev/null
+++ b/modules/mga-advisories/templates/adv-move-pkg
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ "$USER" != "<%= @mgaadv_login %>" ]; then
+ echo "This script must be run as the <%= @mgaadv_login %> user." >&2
+ exit 1
+fi
+
+exec sudo <%= @move_script %> "$@"