summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-01-01 16:12:22 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-01-01 16:12:22 +0000
commit2b6df7bb7785396e8c24d930a5aed5499e2e3d26 (patch)
tree346784d8667b5cb62e0113b27108f2295e6cd79f
parent562c7e820cc7a44384cb81835b995a6e162ca47c (diff)
allow CDROM/FTP for shorter versions of PERMIT_PACKAGES_*,
to encourage people to use them.
-rw-r--r--usr.sbin/pkg_add/pkg_create12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/pkg_create b/usr.sbin/pkg_add/pkg_create
index 3fa2670c2c9..cd75700938d 100644
--- a/usr.sbin/pkg_add/pkg_create
+++ b/usr.sbin/pkg_add/pkg_create
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_create,v 1.128 2010/01/01 16:09:35 espie Exp $
+# $OpenBSD: pkg_create,v 1.129 2010/01/01 16:12:21 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -611,12 +611,14 @@ if ($regen_package) {
$plist->set_pkgname($pkgname);
}
my $fullpkgpath = $subst->value('FULLPKGPATH');
- my $cdrom = $subst->value('PERMIT_PACKAGE_CDROM');
- my $ftp = $subst->value('PERMIT_PACKAGE_FTP');
+ my $cdrom = $subst->value('PERMIT_PACKAGE_CDROM') ||
+ $subst->value('CDROM');;
+ my $ftp = $subst->value('PERMIT_PACKAGE_FTP') ||
+ $subst->value('FTP');
if (defined $fullpkgpath || defined $cdrom || defined $ftp) {
$fullpkgpath //= '';
- $cdrom //= '';
- $ftp //= '';
+ $cdrom //= 'no';
+ $ftp //= 'no';
$cdrom = 'yes' if $cdrom =~ m/^yes$/io;
$ftp = 'yes' if $ftp =~ m/^yes$/io;