patches/system-tools-backends-09-grub-path.diff
author yippi
Mon, 27 Sep 2010 21:07:51 +0000
changeset 20108 51df67ca9307
parent 7577 3cd0040e8532
permissions -rwxr-xr-x
I had these modules listed as being owned by me, but they are really owned by wangke, correcting.

--- ../system-tools-backends-1.4.2.old/boot.pl.in	2006-07-05 13:18:01.697296000 +0100
+++ ./boot.pl.in	2006-07-05 13:27:14.865500000 +0100
@@ -236,7 +236,7 @@
 
 sub gst_boot_entries_get
 {
-  my ($partition) = @_;
+  my ($partition, $bootl) = @_;
   my (%dist_attrib, @res, %fn, @entries, $entry);
   my ($dist, $value, $file, $proc);
   my ($entry, $j, $key, $tmp);
@@ -246,7 +246,7 @@
   $proc = $dist_attrib{"entries_get"};
   @entries = &$proc (\%fn);
 
-  &gst_boot_grub_check_device_map ();
+  &gst_boot_grub_check_device_map ( $bootl );
 
   ${$dist_attrib{"fn"}}{"PARTITION"} = $partition;
 
@@ -323,7 +323,7 @@
               [ "timeout",   \&gst_boot_grub_parse_timeout, GRUB_CONF ],
               [ "prompt",    \&gst_boot_grub_parse_prompt,  GRUB_CONF ],
               [ "default",   \&gst_boot_grub_parse_default, GRUB_CONF ],
-              [ "entry",     \&gst_boot_entries_get,        "%partitions%" ],
+              [ "entry",     \&gst_boot_entries_get,        "%partitions%", $bootl ],
               ] 
        },
 
@@ -343,7 +343,7 @@
               [ "timeout",   \&gst_boot_grub_parse_timeout, GRUB_CONF ],
               [ "prompt",    \&gst_boot_grub_parse_prompt,  GRUB_CONF ],
               [ "default",   \&gst_boot_grub_parse_default, GRUB_CONF ],
-              [ "entry",     \&gst_boot_entries_get,        "%partitions%" ],
+              [ "entry",     \&gst_boot_entries_get,        "%partitions%", $bootl ],
               ] 
        },
 
--- ../system-tools-backends-1.4.2.old/boot-grub.pl.in	2006-07-05 13:18:01.696237000 +0100
+++ ./boot-grub.pl.in	2006-07-05 13:28:41.966770000 +0100
@@ -1054,11 +1054,21 @@
 sub gst_boot_grub_check_device_map
 {
   my ($file) = "$gst_prefix/boot/grub/device.map";
-  my ($fd);
+  my ($fd, $grub_cmd);
+  my ($bootl) = @_;
+
+  if ($bootl eq "sungrub")
+  {
+    $grub_cmd = "$gst_prefix/boot/grub/bin/grub";
+  }
+  else
+  {
+    $grub_cmd = "grub";
+  }
 
   if (! -f $file)
   {
-    $fd = &gst_file_run_pipe_write ("grub --batch --device-map=$file");
+    $fd = &gst_file_run_pipe_write ("$grub_cmd --batch --device-map=$file");
     print $fd "quit\n";
     &gst_file_close ($fd);
   }