diff options
author | 2013-12-30 09:01:30 +0000 | |
---|---|---|
committer | 2013-12-30 09:01:30 +0000 | |
commit | 8cbfaa7dc9340eb51c13a7c733badd612f94c6b2 (patch) | |
tree | bb8d70e54632db844ad7bdf1876cf498e828f657 | |
parent | Correct initialization of Bt458, used in LUNA's 8bpp frame buffer. (diff) | |
download | wireguard-openbsd-8cbfaa7dc9340eb51c13a7c733badd612f94c6b2.tar.xz wireguard-openbsd-8cbfaa7dc9340eb51c13a7c733badd612f94c6b2.zip |
explicitly fix the PATH to something sensible
move "replacing" to a method, so that it can be more specific later.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/AddDelete.pm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm index 8022e55471c..6ab0cdd9b9c 100644 --- a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm +++ b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: AddDelete.pm,v 1.58 2013/12/25 15:59:51 espie Exp $ +# $OpenBSD: AddDelete.pm,v 1.59 2013/12/30 09:01:30 espie Exp $ # # Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org> # @@ -182,6 +182,15 @@ sub handle_options $state->{interactive} = -t STDIN; } $state->{localbase} = $state->opt('L') // OpenBSD::Paths->localbase; + $ENV{PATH} = join(':', + '/bin', + '/sbin', + '/usr/bin', + '/usr/sbin', + '/usr/X11R6/bin', + "$state->{localbase}/bin", + "$state->{localbase}/sbin"); + $state->{size_only} = $state->opt('s'); $state->{quick} = $state->opt('q') || $state->config->istrue("nochecksum"); $state->{extra} = $state->opt('c'); @@ -386,6 +395,12 @@ sub status return $self->{status}; } +sub replacing +{ + my $self = shift; + return $self->{replacing}; +} + OpenBSD::Auto::cache(ldconfig, sub { my $self = shift; |