summaryrefslogtreecommitdiff
path: root/FS/FS/part_pkg.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-06-18 17:15:50 -0700
committerMark Wells <mark@freeside.biz>2015-06-18 17:15:50 -0700
commit9ccb619364f1a04a98d914cd79bc7a75a9e196cb (patch)
tree4e295e4863077df1c26c5eab83b84b6c00d7e3ed /FS/FS/part_pkg.pm
parente653b204c7da74200345c1718ffda973ec8c6cee (diff)
silence many spurious warnings from part_pkg options
Diffstat (limited to 'FS/FS/part_pkg.pm')
-rw-r--r--FS/FS/part_pkg.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm
index 4407ec6..0e9ee05 100644
--- a/FS/FS/part_pkg.pm
+++ b/FS/FS/part_pkg.pm
@@ -1392,6 +1392,11 @@ sub option {
my %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); }
split("\n", $self->get('plandata') );
return $plandata{$opt} if exists $plandata{$opt};
+
+ # check whether the option is defined in plan info (if so, don't warn)
+ if (exists $plans{ $self->plan }->{fields}->{$opt}) {
+ return '';
+ }
cluck "WARNING: (pkgpart ". $self->pkgpart. ") Package def option $opt ".
"not found in options or plandata!\n"
unless $ornull;