diff --git a/lib/puppetx/augeasproviders_grub/util.rb b/lib/puppetx/augeasproviders_grub/util.rb index 6aa5156..784a5cb 100644 --- a/lib/puppetx/augeasproviders_grub/util.rb +++ b/lib/puppetx/augeasproviders_grub/util.rb @@ -152,7 +152,9 @@ def self.grub2_cfg_paths valid_paths = paths.map do |path| begin real_path = File.realpath(path) - real_path if (File.readable?(real_path) && !File.directory?(real_path)) + real_path if (File.readable?(real_path) && !File.directory?(real_path)) && + # Exclude stub files which include main config (e.g. Debian OS family) + (File.foreach(real_path).grep(/^configfile /).none?) rescue Errno::ENOENT nil end