diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-07-12 10:52:11 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-07-12 10:52:11 +0000 |
commit | 4c1b4588f17cecb5f1cf95734b384aaaee15c763 (patch) | |
tree | ffba8aba525ccfbc163b585ebb259b62582d07ba /lib/Youri/Submit/Action | |
parent | 333578abe87a66d083f852f37425e6cd7e4871db (diff) | |
download | mga-youri-submit-4c1b4588f17cecb5f1cf95734b384aaaee15c763.tar mga-youri-submit-4c1b4588f17cecb5f1cf95734b384aaaee15c763.tar.gz mga-youri-submit-4c1b4588f17cecb5f1cf95734b384aaaee15c763.tar.bz2 mga-youri-submit-4c1b4588f17cecb5f1cf95734b384aaaee15c763.tar.xz mga-youri-submit-4c1b4588f17cecb5f1cf95734b384aaaee15c763.zip |
run maintdb as maintdb user
Diffstat (limited to 'lib/Youri/Submit/Action')
-rw-r--r-- | lib/Youri/Submit/Action/UpdateMaintDb.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Youri/Submit/Action/UpdateMaintDb.pm b/lib/Youri/Submit/Action/UpdateMaintDb.pm index a8224cf..ca92299 100644 --- a/lib/Youri/Submit/Action/UpdateMaintDb.pm +++ b/lib/Youri/Submit/Action/UpdateMaintDb.pm @@ -26,12 +26,14 @@ sub _init { maintdb_url => '', maintdb_key => '', maintdb_binpath => '/usr/local/sbin/maintdb', + maintdb_user => 'maintdb', @_ ); $self->{_maintdb_url} = $options{maintdb_url}; $self->{_maintdb_key} = $options{maintdb_key}; $self->{_maintdb_binpath} = $options{maintdb_binpath}; + $self->{_maintdb_user} = $options{maintdb_user}; return $self; } @@ -48,7 +50,7 @@ sub run { my $pkg_media = $repository->_get_main_section($package, $target, $define); my $pkg_commiter = $define->{user}; - system($self->{_maintdb_binpath}, 'root', 'new', $pkg_name, $pkg_commiter); + system('sudo', '-u', $self->{_maintdb_user}, $self->{_maintdb_binpath}, 'root', 'new', $pkg_name, $pkg_commiter); my $ua = LWP::UserAgent->new; $ua->agent('Youri/0.1 ' . $ua->agent); |