diff options
author | Bernd Ahlers <bernd@cvs.openbsd.org> | 2005-11-02 17:01:27 +0000 |
---|---|---|
committer | Bernd Ahlers <bernd@cvs.openbsd.org> | 2005-11-02 17:01:27 +0000 |
commit | d079818e54db1e313d6a9204becaf9e9b7f6ce8d (patch) | |
tree | 7045b3b2af8cbc39ca85aa32d70a91fd13331212 /usr.sbin | |
parent | e84c8ef494253da47889c7fee137e7f3fbf23211 (diff) |
Simplify OpenBSD::PackingElement::Sysctl::install().
okay espie@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Add.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm index 98f0b159fbc..d2074614516 100644 --- a/usr.sbin/pkg_add/OpenBSD/Add.pm +++ b/usr.sbin/pkg_add/OpenBSD/Add.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Add.pm,v 1.43 2005/10/19 10:41:19 espie Exp $ +# $OpenBSD: Add.pm,v 1.44 2005/11/02 17:01:26 bernd Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -295,10 +295,9 @@ sub install my ($self, $state) = @_; my $name = $self->{name}; - open(my $pipe, '-|', '/sbin/sysctl', $name); + open(my $pipe, '-|', '/sbin/sysctl', '-n', $name); my $actual = <$pipe>; chomp $actual; - $actual =~ s/^\Q$name\E\s*\=\s*//; if ($self->{mode} eq '=' && $actual eq $self->{value}) { return; } |