From d605cd7ccb6b93143e5aac1668f80e5bf4ad46a6 Mon Sep 17 00:00:00 2001 From: codehelp Date: Sat, 25 Dec 2010 10:57:04 +0000 Subject: [PATCH] Fail if the config file cannot be sensibly parsed as an keyfile. git-svn-id: http://emdebian.org/svn/current@7703 563faec7-e20c-0410-992a-a66f704d0ccd --- multistrap | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/multistrap b/multistrap index e74ffb2..e21c8a8 100755 --- a/multistrap +++ b/multistrap @@ -829,7 +829,10 @@ will be created - it is not packed into a .tgz once complete. sub cascade { $file = shift; - $config = Config::Auto::parse($file); + $config = Config::Auto::parse($file, format => 'ini'); + if (not defined $config or (scalar keys %$config) == 0) { + die ("$progname: ". _g("Failed to parse '$file'!\n")); + } foreach $key (%$config) { $type = lc($key) if (ref $key ne "HASH"); $value = $key if (ref $key eq "HASH");