Accepting request 326351 from home:michael-chang:branches:Base:System

- add systemd-sleep-plugin subpackage (bsc#941758) 
- evaluate the menu entry's title string by printf 
  * modified grub2-once
  * added grub2-systemd-sleep.sh

OBS-URL: https://build.opensuse.org/request/show/326351
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=175
This commit is contained in:
2015-08-26 09:54:23 +00:00
committed by Git OBS Bridge
parent 52f8e0a917
commit 47a255b20c
4 changed files with 247 additions and 3 deletions

View File

@@ -15,12 +15,12 @@ my @menuentry;
sub parse_menuentry {
my ($parent, $menu) = @_;
my @m = $menu =~ /(submenu|menuentry) \s+ '([^']*)' .*? ( \{ (?: [^{}]* | (?3))* \} )/sxg;
my @m = $menu =~ /(submenu|menuentry) \s+ (.*?) ( \{ (?: [^{}]* | (?3))* \} )/sxg;
for (my $i = 0; $i <= $#m; $i += 3) {
my $type = $m[$i];
my $title = $m[$i+1];
my $title = `printf "%s\n" $m[$i+1] | head -1 | tr -d '\n'`;
my $data = $m[$i+2];
my $name = ($parent) ? "$parent>$title" : "$title";