diff options
author | Joe Rayhawk <jrayhawk@cobain.omgwallhack.org> | 2011-12-05 23:06:13 -0800 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@cobain.omgwallhack.org> | 2011-12-05 23:06:13 -0800 |
commit | 495fb118be30b662cafc1715cdf235a5e0210079 (patch) | |
tree | 484e7b477b121177ed481f406bd018a8e6472f2a /libpiny | |
parent | 0cddd39752de56fb0fa407d66140502d89c741a8 (diff) | |
download | piny-code-495fb118be30b662cafc1715cdf235a5e0210079.tar.gz piny-code-495fb118be30b662cafc1715cdf235a5e0210079.zip |
Piny::Repo: fix cwd impermission problem by hardcoding a known-rx dir
Diffstat (limited to 'libpiny')
-rw-r--r-- | libpiny/lib/Piny/Repo.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index a4b1890..9796d9f 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -310,6 +310,8 @@ sub rebuild_git { sub rebuild_ikiwiki { my ( $s ) = @_; + chdir( "/srv/git" ); # because git likes to chdir back to its original cwd for some dumb reason, which isn't guaranteed to work. + unless( getpwnam("iki-" . $s->shortname ) ) { system( "/usr/sbin/adduser", "--quiet", "--system", "--group", "--gecos", $s->shortname, "iki-" . $s->shortname ) and die "Could not create ikiwiki user!"; system( "/usr/sbin/adduser", "--quiet", "iki-" . $s->shortname, "git-" . $s->shortname ) and die "Could not add ikiwiki user to the repo group!"; |