fix dev-cammount

Change-Id: I22097d95ae12491336303ae9ce545c55cba1a6da
This commit is contained in:
Andrew Gerrand 2013-07-10 19:34:58 +10:00
parent d8c3b5a4e9
commit 7c84faa7b5
1 changed files with 10 additions and 0 deletions

View File

@ -16,13 +16,23 @@ if (@ARGV) {
}
my $cammount = build_bin("./cmd/cammount");
unless (-x $cammount) { die "Failed to find $cammount" }
my $dir = "/tmp/cammount-dir";
mkdir $dir, 0700 unless -d $dir;
try_unmount();
print "Mounting on $dir ...\n";
# Respected by camli/osutil:
$ENV{"CAMLI_CONFIG_DIR"} = "$Bin/config/dev-client-dir";
# Respected by env expansions in config/dev-client-dir/config
$ENV{"CAMLI_SECRET_RING"} = "$Bin/pkg/jsonsign/testdata/test-secring.gpg";
$ENV{"CAMLI_KEYID"} = "26F5ABDA";
$ENV{"CAMLI_DEV_KEYBLOBS"} = "$Bin/config/dev-client-dir/keyblobs";
$ENV{"CAMLI_AUTH"} = "userpass:camlistore:pass3179";
system("$cammount", "--server=http://localhost:3179/bs", $dir, @blobref_arg)
and warn "cammount failure: $!\n";
warn "Failed to unmount\n" unless try_unmount();