From 495fb118be30b662cafc1715cdf235a5e0210079 Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Mon, 5 Dec 2011 23:06:13 -0800 Subject: Piny::Repo: fix cwd impermission problem by hardcoding a known-rx dir --- libpiny/lib/Piny/Repo.pm | 2 ++ 1 file changed, 2 insertions(+) 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!"; -- cgit v1.2.3