diff options
author | Joe Rayhawk <jrayhawk@omgwallhack.org> | 2011-04-27 18:23:33 -0700 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@omgwallhack.org> | 2011-04-27 18:23:33 -0700 |
commit | bfffd588f6ea2184324b5ab11f1189b8d6b262f1 (patch) | |
tree | a79165ac71f1949daadf3b2010400630e974d8e0 /libpiny/lib | |
parent | 25faf8d340ea1e37d809febbb2c4252fc56d4599 (diff) | |
download | piny-code-bfffd588f6ea2184324b5ab11f1189b8d6b262f1.tar.gz piny-code-bfffd588f6ea2184324b5ab11f1189b8d6b262f1.zip |
Make sure shortname refs get fully evaluated.
Diffstat (limited to 'libpiny/lib')
-rw-r--r-- | libpiny/lib/Piny/Repo.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index dc4e5c1..25bd744 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -376,13 +376,13 @@ sub create { mkdir( $repo->path ) or die "The repo $name appears to already exist! ($!)"; - system( "/usr/sbin/adduser", "--quiet", "--system", "--group", "--gecos", $name, "iki-$repo->shortname" ) and die "Could not create ikiwiki user!"; + system( "/usr/sbin/adduser", "--quiet", "--system", "--group", "--gecos", $name, "iki-" . $repo->shortname ) and die "Could not create ikiwiki user!"; + + my $ikiuser = Piny::User::IkiWiki->new( "name" => "iki-" . $repo->shortname ); - my $ikiuser = Piny::User::IkiWiki->new( "name" => "iki-$repo->shortname" ); + system( "/usr/sbin/addgroup", "--quiet", "git-" . $repo->shortname ) and die "Could not create repo group!"; - system( "/usr/sbin/addgroup", "--quiet", "git-$repo->shortname" ) and die "Could not create repo group!"; - - my $group = Piny::Group->new( "name" => "git-$repo->shortname" ); + my $group = Piny::Group->new( "name" => "git-" . $repo->shortname ); system( "/usr/sbin/adduser", "--quiet", $user->name, $group->name ) and die "Could not add you to the repo group!"; system( "/usr/sbin/adduser", "--quiet", $ikiuser->name, $group->name ) and die "Could not add ikiwiki user to the repo group!"; |