aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-07-12 14:46:25 +0000
committerNicolas Vigier <boklm@mageia.org>2011-07-12 14:46:25 +0000
commitdb246408bc373533aeaf19941e8e2579d3474fff (patch)
treef402e08715b83ca2023778fba206e591a996ea27
parent853068e2b9d27b7ec4b6c7ac97b4bdab3a49529c (diff)
downloadpuppet-db246408bc373533aeaf19941e8e2579d3474fff.tar
puppet-db246408bc373533aeaf19941e8e2579d3474fff.tar.gz
puppet-db246408bc373533aeaf19941e8e2579d3474fff.tar.bz2
puppet-db246408bc373533aeaf19941e8e2579d3474fff.tar.xz
puppet-db246408bc373533aeaf19941e8e2579d3474fff.zip
add option to allow using maintdb
-rw-r--r--modules/restrictshell/manifests/init.pp4
-rw-r--r--modules/restrictshell/templates/sv_membersh.pl10
2 files changed, 14 insertions, 0 deletions
diff --git a/modules/restrictshell/manifests/init.pp b/modules/restrictshell/manifests/init.pp
index faaa8bd0..c4f1151b 100644
--- a/modules/restrictshell/manifests/init.pp
+++ b/modules/restrictshell/manifests/init.pp
@@ -60,6 +60,10 @@ class restrictshell {
class allow_sftp {
allow{ "sftp": }
}
+
+ class allow_maintdb {
+ allow{ "maintdb": }
+ }
# technically, we could add cvs too
# but I doubt we will use it one day
diff --git a/modules/restrictshell/templates/sv_membersh.pl b/modules/restrictshell/templates/sv_membersh.pl
index 88ff8a71..f200728d 100644
--- a/modules/restrictshell/templates/sv_membersh.pl
+++ b/modules/restrictshell/templates/sv_membersh.pl
@@ -65,6 +65,10 @@ our $use_pkgsubmit = "0";
our $regexp_pkgsubmit = "^/usr/share/repsys/create-srpm |^/usr/local/bin/submit_package ";
our $bin_pkgsubmit = "/usr/local/bin/submit_package";
+our $use_maintdb = "0";
+our $regexp_maintdb = "^/usr/local/bin/wrapper.maintdb ";
+our $bin_maintdb = "/usr/local/bin/wrapper.maintdb";
+
# Open configuration file
if (-e "/etc/membersh-conf.pl") {
do "/etc/membersh-conf.pl" or die "System misconfiguration, contact administrators. Exiting";
@@ -92,6 +96,8 @@ if (-e "/etc/membersh-conf.pl") {
# $regexp_dir_rsync = "^(/upload)|(/var/ftp)";
#
# $use_pkgsubmit = "1";
+#
+# $use_maintdb = "1";
if ($#ARGV == 1 and $ARGV[0] eq "-c") {
@@ -145,6 +151,10 @@ if ($#ARGV == 1 and $ARGV[0] eq "-c") {
my ($createsrpm, @rest) = split(' ', $ARGV[1]);
exec($bin_pkgsubmit, @rest) or die("Failed to exec $bin_pkgsubmit: $!");
+ } elsif ($use_maintdb and
+ $ARGV[1] =~ m:$regexp_maintdb:) {
+ my ($maintdb, @rest) = split(' ', $ARGV[1]);
+ exec($bin_maintdb, @rest) or die("Failed to exec $bin_maintdb: $!");
}
}