Hello community,

here is the log from the commit of package grub2 for openSUSE:Factory checked 
in at 2014-02-22 20:44:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/grub2 (Old)
 and      /work/SRC/openSUSE:Factory/.grub2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "grub2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/grub2/grub2.changes      2014-02-15 
08:53:42.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.grub2.new/grub2.changes 2014-02-22 
20:44:16.000000000 +0100
@@ -1,0 +2,7 @@
+Thu Feb 20 14:43:21 UTC 2014 - [email protected]
+
+- updating grub2-once
+  - added --list switch.
+  - improved --help and error handling.
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ grub2-once ++++++
--- /var/tmp/diff_new_pack.kJhGoW/_old  2014-02-22 20:44:18.000000000 +0100
+++ /var/tmp/diff_new_pack.kJhGoW/_new  2014-02-22 20:44:18.000000000 +0100
@@ -1,4 +1,8 @@
 #!/usr/bin/perl
+#
+# (C) 2014 [email protected]
+#
+# 2014-02-20 [email protected]
 
 use strict;
 
@@ -37,9 +41,9 @@
     $id_name = $ARGV[0];
 } 
 
-die "wrong command line options" if ($id_name eq "");
+die "wrong command line options, try --help\n" if ($id_name eq "");
 
-open(SYSCONF, "</etc/sysconfig/bootloader") || die "no bootloader sysconfig";
+open(SYSCONF, "</etc/sysconfig/bootloader") || die "cannot read bootloader 
sysconfig: $!\n";
 
 $grub2_dir = "";
 while (<SYSCONF>) {
@@ -55,9 +59,16 @@
 
 close (SYSCONF);
 
+if ($id_name eq "--help" or $id_name eq "-h")
+  {
+    print "Usage: grub2-once [--show-mapped ID | --list | ID | NAME_SUBSTRING 
]\n";
+    system "$grub2_reboot \"--help\"";
+    exit 0;
+  }
+
 die "no grub2_dir" if ($grub2_dir eq "");
 
-open(MENU, "<$grub2_dir/grub.cfg") || die "no grub.cfg in $grub2_dir";
+open(MENU, "<$grub2_dir/grub.cfg") || die "cannot read grub.cfg in $grub2_dir: 
$!\n";
 undef $/;
 
 while (<MENU>) {
@@ -70,6 +81,17 @@
 my $name = "";
 my $id = -1;
 
+if ($id_name eq '--list')
+  {
+    my $c = 0;
+    foreach my $e (@menuentry) 
+      {
+        printf "%6d %s\n", $c, $e;
+       $c++;
+      }
+    exit 0;
+  }
+
 if ($id_name =~ m!^[0-9]+$!) {
 
     if ($id_name < @menuentry) {

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to