diff options
author | 2014-05-30 15:04:54 +0000 | |
---|---|---|
committer | 2014-05-30 15:04:54 +0000 | |
commit | 632eb2258f7918b97b4ff8a2631ed181266a2fcb (patch) | |
tree | 9d1331d60206adff30ebe9ac94043170fa77a3eb | |
parent | More KNF. (diff) | |
download | wireguard-openbsd-632eb2258f7918b97b4ff8a2631ed181266a2fcb.tar.xz wireguard-openbsd-632eb2258f7918b97b4ff8a2631ed181266a2fcb.zip |
oops, auto-read config only *after* we have a way to print out errors.
Also zap bad lines completely.
issue reported by aja@
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/AddDelete.pm | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/State.pm | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm index 2839235ffca..5de4eaac48d 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.62 2014/05/20 05:46:13 espie Exp $ +# $OpenBSD: AddDelete.pm,v 1.63 2014/05/30 15:04:54 espie Exp $ # # Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org> # @@ -214,8 +214,8 @@ sub init $self->{status} = OpenBSD::Status->new; $self->{recorder} = OpenBSD::SharedItemsRecorder->new; $self->{v} = 0; - $self->{wantntogo} = $self->config->istrue("ntogo"); $self->SUPER::init(@_); + $self->{wantntogo} = $self->config->istrue("ntogo"); $self->{export_level}++; } diff --git a/usr.sbin/pkg_add/OpenBSD/State.pm b/usr.sbin/pkg_add/OpenBSD/State.pm index cbca91a79d8..7bf339b5752 100644 --- a/usr.sbin/pkg_add/OpenBSD/State.pm +++ b/usr.sbin/pkg_add/OpenBSD/State.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: State.pm,v 1.28 2014/05/20 05:43:55 espie Exp $ +# $OpenBSD: State.pm,v 1.29 2014/05/30 15:04:54 espie Exp $ # # Copyright (c) 2007-2014 Marc Espie <espie@openbsd.org> # @@ -47,6 +47,7 @@ sub read_file # bad line: should we say so ? $state->errsay("Bad line in #1: #2 (#3)", $filename, $_, $.); + next; } # remove caps $k =~ tr/A-Z/a-z/; |