diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 9 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_delete | 4 |
3 files changed, 10 insertions, 7 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index f43c1350205..cf11c2d181a 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackingElement.pm,v 1.19 2004/08/06 10:23:45 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.20 2004/08/07 17:27:26 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -355,7 +355,7 @@ sub keyword() { "lib" } our $todo; my $path; -our $ldconfig = '/sbin/ldconfig'; +our @ldconfig = ('/sbin/ldconfig'); sub add_ldconfig_dirs() { @@ -372,7 +372,10 @@ sub mark_ldconfig_directory my ($self, $destdir) = @_; if (!defined $path) { $path={}; - open my $fh, "-|", $ldconfig, "-r"; + if ($destdir ne '') { + unshift @ldconfig, 'chroot', $destdir; + } + open my $fh, "-|", @ldconfig, "-r"; if (defined $fh) { local $_; while (<$fh>) { diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index a91e2dd7027..fc3aa0e3855 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.46 2004/08/06 14:33:02 espie Exp $ +# $OpenBSD: pkg_add,v 1.47 2004/08/07 17:27:26 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -38,7 +38,7 @@ sub ensure_ldconfig return unless defined $OpenBSD::PackingElement::Lib::todo; print "running ldconfig -m ", join(' ', keys %$OpenBSD::PackingElement::Lib::todo), "\n" if $verbose; - system($OpenBSD::PackingElement::Lib::ldconfig, "-m", + system(@OpenBSD::PackingElement::Lib::ldconfig, "-m", keys %$OpenBSD::PackingElement::Lib::todo); undef $OpenBSD::PackingElement::Lib::todo; } diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete index bcdb7aaf7e2..69fe715251c 100644 --- a/usr.sbin/pkg_add/pkg_delete +++ b/usr.sbin/pkg_add/pkg_delete @@ -1,6 +1,6 @@ #!/usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_delete,v 1.36 2004/08/06 14:33:02 espie Exp $ +# $OpenBSD: pkg_delete,v 1.37 2004/08/07 17:27:26 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -35,7 +35,7 @@ sub ensure_ldconfig my $verbose = shift; return unless defined $OpenBSD::PackingElement::Lib::todo; print "running ldconfig -R\n" if $verbose; - system($OpenBSD::PackingElement::Lib::ldconfig, "-R"); + system(@OpenBSD::PackingElement::Lib::ldconfig, "-R"); undef $OpenBSD::PackingElement::Lib::todo; } |