summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--boot-grub.pl.in15
2 files changed, 19 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e9ba8c9..b77ddd4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-01 Carlos Garnacho Parro <garnacho@tuxerver.net>
+
+ * boot-grub.pl.in: added some notification when the file can't be
+ found
+
2004-02-01 Ole Laursen <olau@hardworking.dk>
* configure.in: Added "da" (Danish) to ALL_LINGUAS.
diff --git a/boot-grub.pl.in b/boot-grub.pl.in
index 07ac36c..5976ebe 100644
--- a/boot-grub.pl.in
+++ b/boot-grub.pl.in
@@ -51,6 +51,7 @@ sub gst_boot_grub_get_config_file
return "/etc/grub.conf" if -f "/etc/grub.conf";
return "/boot/grub/menu.lst" if -f "/boot/grub/menu.lst";
return "/boot/grub/grub.conf" if -f "/boot/grub/grub.conf";
+
return undef;
}
@@ -227,6 +228,13 @@ sub gst_boot_grub_entries_set
return if (scalar @$entries <=0);
$buff = &gst_file_buffer_load ($file);
+
+ if ($buff eq undef)
+ {
+ &gst_report ("boot_conf_read_failed", $file);
+ return undef;
+ }
+
&gst_file_buffer_join_lines ($buff);
$lineno = &gst_boot_grub_find_entry ($buff, 0);
@@ -419,7 +427,12 @@ sub gst_boot_grub_get_entries
last if $fd;
}
- return undef if !$fd;
+ if (!$fd)
+ {
+ &gst_report ("boot_conf_read_failed", "/boot/grub/menu.lst");
+ return undef;
+ }
+
$buff = &gst_file_buffer_load_fd ($fd);
$line_no = 0;