patches/system-tools-backends-09-grub-path.diff
author rohinis
Tue, 29 Nov 2011 17:32:55 +0000
branchs11express-2010-11
changeset 22234 c23e64da3e06
parent 7577 3cd0040e8532
permissions -rwxr-xr-x
2011-11-29 Rohini S <[email protected]> * patches/Python26-22-audio.diff: Fixes CVE-2010-1634 * specs/SUNWPython26.spec: Fixes CR 7085446

--- ../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);
   }