summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-10-13 18:39:08 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-10-13 18:39:08 +0000
commit79f73b643600b9cb3b1cf392b4b4d9ea232c4eea (patch)
tree851b0ff6f6dac438782f88d04736c28daaa95751 /usr.sbin/pkg_add/OpenBSD/PackingElement.pm
parentd0f9c6c45637daa9cb66a59e59d0a059a0831915 (diff)
@sysctl
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm25
1 files changed, 24 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index 1294d8d4cbb..0470b2fb9d9 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.54 2004/10/12 21:05:20 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.55 2004/10/13 18:39:07 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -861,6 +861,29 @@ sub destate
}
}
+package OpenBSD::PackingElement::Sysctl;
+our @ISA=qw(OpenBSD::PackingElement::Action);
+
+__PACKAGE__->setKeyword('sysctl');
+sub keyword() { 'sysctl' }
+
+sub new
+
+{
+ my ($class, $args) = @_;
+ if ($args =~ m/^\s*(.*)\s*(\=|\>=)\s*(.*)\s*$/) {
+ bless { name => $1, mode => $2, value => $3}, $class;
+ } else {
+ die "Bad syntax for \@sysctl";
+ }
+}
+
+sub stringize
+{
+ my $self = $_[0];
+ return $self->{name}.$self->{mode}.$self->{value};
+}
+
package OpenBSD::PackingElement::ExeclikeAction;
use File::Basename;
use OpenBSD::Error;