summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-06-05 12:35:33 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-06-05 12:35:33 +0000
commit34efc00b4042f87181ec69432f8164115bae2208 (patch)
tree4b3d316d79c628b344c0bb8dc75971631f1d9f73 /usr.sbin/pkg_add/OpenBSD
parent1b3f92afa619cfd154471fde302432bf183ed20d (diff)
use lock_db(unshared), since we may tweak things
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgFsck.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgFsck.pm b/usr.sbin/pkg_add/OpenBSD/PkgFsck.pm
index 93d8f0eca89..53ed5f7e069 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgFsck.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgFsck.pm
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgFsck.pm,v 1.1 2010/06/05 12:30:36 espie Exp $
+# $OpenBSD: PkgFsck.pm,v 1.2 2010/06/05 12:35:32 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -311,6 +311,7 @@ sub parse_and_run
$state->{interactive} = $state->opt('i');
$state->{force} = $state->opt('f');
$state->{quick} = $state->opt('q');
+ lock_db(0) unless $state->{subst}->value('nolock');
$self->run($state);
$state->log->dump;
}