From c891f54de3f345d088725cd4ea4eaa267dfcf272 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 18 Jan 2010 16:02:51 +0000 Subject: (is_false) fix accepting values vritten by configurator (#56348) --- mdkapplet | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'mdkapplet') diff --git a/mdkapplet b/mdkapplet index fab05682..12af7052 100755 --- a/mdkapplet +++ b/mdkapplet @@ -366,6 +366,11 @@ sub clean_distro_cache() { undef $no_more_supported; } +sub is_false { + my ($s) = @_; + !text2bool($s) && $s != 1; +} + # Signal management sub harvester { my ($_signame, $_clean) = @_; @@ -396,8 +401,8 @@ sub harvester { go2State($sub_state); } elsif ($no_more_supported) { go2State('no_more_supported'); - } elsif ($new_distro && $config{DO_NOT_ASK_FOR_DISTRO_UPGRADE} !~ /^true$/i - && $local_config{DO_NOT_ASK_FOR_DISTRO_UPGRADE} !~ /^true$/i) { + } elsif ($new_distro && is_false($config{DO_NOT_ASK_FOR_DISTRO_UPGRADE}) + && is_false($local_config{DO_NOT_ASK_FOR_DISTRO_UPGRADE})) { go2State('new_distribution'); } else { go2State($sub_state); -- cgit v1.2.1