Magellan Linux

Annotation of /trunk/grubby/test/results/add/g2-1.1

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1722 - (hide annotations) (download)
Sat Feb 18 00:53:14 2012 UTC (12 years, 3 months ago) by niro
File size: 2741 byte(s)
Update "echo 'Loading..." messages to the new kernel version

grub2-mkconfig will create lines like:
		echo    'Loading Linux 3.1.0-0.rc6.git0.0.fc16.x86_64 
...'
- depending on the content of /etc/default/grub.

grubby would recognize these lines and replace them with lines with the 
right
version number such as:
	echo 'Loading Fedora (3.1.0-0.rc6.git0.0.fc16.x86_64)'

these lines were however not recognized by grubby and would not be 
updated on
next kernel update when this entry would be used as template.

With this patch grubby will no longer look for a specific title but 
patch any
"echo 'Loading" line immediately before the kernel line.

Signed-off-by: Adam Williamson <awilliam@redhat.com>


1 niro 1698 #
2     # DO NOT EDIT THIS FILE
3     #
4     # It is automatically generated by grub2-mkconfig using templates
5     # from /etc/grub.d and settings from /etc/default/grub
6     #
7    
8     ### BEGIN /etc/grub.d/00_header ###
9     if [ -s $prefix/grubenv ]; then
10     load_env
11     fi
12     set default="1"
13     if [ "${prev_saved_entry}" ]; then
14     set saved_entry="${prev_saved_entry}"
15     save_env saved_entry
16     set prev_saved_entry=
17     save_env prev_saved_entry
18     set boot_once=true
19     fi
20    
21     function savedefault {
22     if [ -z "${boot_once}" ]; then
23     saved_entry="${chosen}"
24     save_env saved_entry
25     fi
26     }
27    
28     function load_video {
29     insmod vbe
30     insmod vga
31     insmod video_bochs
32     insmod video_cirrus
33     }
34    
35     set timeout=5
36     ### END /etc/grub.d/00_header ###
37    
38     ### BEGIN /etc/grub.d/10_linux ###
39     menuentry 'title' --class gnu-linux --class gnu --class os {
40     load_video
41     set gfxpayload=keep
42     insmod part_msdos
43     insmod ext2
44     set root='(hd0,msdos1)'
45     search --no-floppy --fs-uuid --set=root df0170c9-7d05-415c-bbd1-d4d503ba0eed
46     echo 'Loading title'
47     linux /new-kernel.img root=/dev/mapper/vg_pjones5-lv_root ro quiet rhgb
48     echo 'Loading initial ramdisk ...'
49     initrd /new-initrd
50     }
51 niro 1722 menuentry 'Linux, with Fedora 2.6.38.8-32.fc15.x86_64' --class gnu-linux --class gnu --class os {
52 niro 1698 load_video
53     set gfxpayload=keep
54     insmod part_msdos
55     insmod ext2
56     set root='(hd0,msdos1)'
57     search --no-floppy --fs-uuid --set=root df0170c9-7d05-415c-bbd1-d4d503ba0eed
58 niro 1722 echo 'Loading Fedora 2.6.38.8-32.fc15.x86_64 ...'
59 niro 1698 linux /vmlinuz-2.6.38.8-32.fc15.x86_64 root=/dev/mapper/vg_pjones5-lv_root ro quiet rhgb
60     echo 'Loading initial ramdisk ...'
61     initrd /initramfs-2.6.38.8-32.fc15.x86_64.img
62     }
63     menuentry 'Linux, with Linux 2.6.38.2-9.fc15.x86_64' --class gnu-linux --class gnu --class os {
64     load_video
65     set gfxpayload=keep
66     insmod part_msdos
67     insmod ext2
68     set root='(hd0,msdos1)'
69     search --no-floppy --fs-uuid --set=root df0170c9-7d05-415c-bbd1-d4d503ba0eed
70     echo 'Loading Linux 2.6.38.2-9.fc15.x86_64 ...'
71     linux /vmlinuz-2.6.38.2-9.fc15.x86_64 root=/dev/mapper/vg_pjones5-lv_root ro quiet rhgb
72     echo 'Loading initial ramdisk ...'
73     initrd /initramfs-2.6.38.2-9.fc15.x86_64.img
74     }
75     ### END /etc/grub.d/10_linux ###
76    
77     ### BEGIN /etc/grub.d/20_linux_xen ###
78     ### END /etc/grub.d/20_linux_xen ###
79    
80     ### BEGIN /etc/grub.d/30_os-prober ###
81     ### END /etc/grub.d/30_os-prober ###
82    
83     ### BEGIN /etc/grub.d/40_custom ###
84     # This file provides an easy way to add custom menu entries. Simply type the
85     # menu entries you want to add after this comment. Be careful not to change
86     # the 'exec tail' line above.
87     ### END /etc/grub.d/40_custom ###
88    
89     ### BEGIN /etc/grub.d/41_custom ###
90     if [ -f $prefix/custom.cfg ]; then
91     source $prefix/custom.cfg;
92     fi
93     ### END /etc/grub.d/41_custom ###
94    
95     ### BEGIN /etc/grub.d/90_persistent ###
96     ### END /etc/grub.d/90_persistent ###