X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=scripts%2Fkconfig.pl;h=6a6bbd27472b929005e22f42498057603c8ae457;hb=ee55a19a618a30182213937c8c96e056d8f9ed41;hp=811327353867f8303f4c226f5c84b3f4c5bb47ec;hpb=b760b5fcf7fcb75a2df9c1debcc44733dda57244;p=openwrt%2Fopenwrt.git diff --git a/scripts/kconfig.pl b/scripts/kconfig.pl index 8113273538..6a6bbd2747 100755 --- a/scripts/kconfig.pl +++ b/scripts/kconfig.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl # -# Copyright (C) 2006 Felix Fietkau +# Copyright (C) 2006 Felix Fietkau # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -29,7 +29,7 @@ sub load_config($$) { my $mod_plus = shift; my %config; - open FILE, "$file" or die "can't open file"; + open FILE, "$file" or die "can't open file '$file'"; while () { chomp; /^$PREFIX(.+?)=(.+)/ and do { @@ -73,7 +73,10 @@ sub config_add($$$) { my %cfg = %$_; foreach my $config (keys %cfg) { - next if $mod_plus and $config{$config} and $config{$config} eq "y"; + if ($mod_plus and $config{$config}) { + next if $config{$config} eq "y"; + next if $cfg{$config} eq '#undef'; + } $config{$config} = $cfg{$config}; } }