summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-11-13 13:34:03 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-11-13 13:34:03 +0000
commit841ebb4fe10b4f2647dabfd1f5d7692aeb7062d0 (patch)
tree138cdd31800eae0037fa74a8d7a1c8124b2b8885
parentd2c44755eed3670ac26eaf9baae003a0d016557b (diff)
pkg_add should have -c and -q since it may delete packages.
-rw-r--r--usr.sbin/pkg_add/pkg_add8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index 7284f7a5e20..d4721a9ca1e 100644
--- a/usr.sbin/pkg_add/pkg_add
+++ b/usr.sbin/pkg_add/pkg_add
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_add,v 1.115 2004/11/13 13:06:11 espie Exp $
+# $OpenBSD: pkg_add,v 1.116 2004/11/13 13:34:02 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -554,9 +554,9 @@ sub install_package
return ();
}
-our ($opt_a, $opt_v, $opt_n, $opt_I, $opt_f, $opt_L, $opt_B, $opt_A, $opt_P, $opt_Q, $opt_x, $opt_r);
+our ($opt_a, $opt_v, $opt_n, $opt_I, $opt_f, $opt_L, $opt_B, $opt_A, $opt_P, $opt_Q, $opt_x, $opt_r, $opt_q, $opt_c);
$opt_v = 0;
-getopts('avnrxIL:f:B:A:P:Q:',
+getopts('aqcvnrxIL:f:B:A:P:Q:',
{'v' => sub {++$opt_v;} });
if ($opt_f) {
%forced = map {($_, 1)} split(/,/, $opt_f);
@@ -607,6 +607,8 @@ if (defined $state->{destdir}) {
$state->{conflict_list} = {};
$state->{not} = $opt_n;
+$state->{quick} = $opt_q;
+$state->{extra} = $opt_c;
$state->{dont_run_scripts} = $opt_I;
$state->{very_verbose} = $opt_v >= 2;
$state->{verbose} = $opt_v;