diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2009-01-27 17:30:40 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2009-01-27 17:30:40 +0000 |
commit | e73eea7e7d4e482f12125cdc0689dd31fe114547 (patch) | |
tree | 0c91056b3c5b3e2d0efbe9d723e3336f29a7b5ac | |
parent | c9aeea52861ba52fee684fe48067b019dbbe79e9 (diff) | |
download | bootloader-theme-e73eea7e7d4e482f12125cdc0689dd31fe114547.tar bootloader-theme-e73eea7e7d4e482f12125cdc0689dd31fe114547.tar.gz bootloader-theme-e73eea7e7d4e482f12125cdc0689dd31fe114547.tar.bz2 bootloader-theme-e73eea7e7d4e482f12125cdc0689dd31fe114547.tar.xz bootloader-theme-e73eea7e7d4e482f12125cdc0689dd31fe114547.zip |
do not display some menu entries (eg: noacpi)
many options can be obtained using "Fx", but we still keep some entries in
case gfxboot fails. We simply hide them when gfxboot is used
-rw-r--r-- | src/common.inc | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/common.inc b/src/common.inc index a8251be..af6a46d 100644 --- a/src/common.inc +++ b/src/common.inc @@ -460,6 +460,50 @@ % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% get rid of some entries +% the resulting arrrays are malloced +% ( menu_entries_array cmdline_args_array ) == > ( menu_entries_array cmdline_args_array ) +/filter_install_menu_items { + /tmp.args exch def + /tmp.texts exch def + + /keep_it { + syslinux { + dup "alt0" eq + over "alt1" eq or + over "vgalo" eq or + over "vgahi" eq or + over "text" eq or + over "noacpi" eq or + } { + dup "linux-nonfb" eq + } ifelse + exch pop not + } def + + 0 + tmp.texts { + keep_it { 1 add } if + } forall + dup + array /menu.args exch def + array /menu.texts exch def + + /tmp.i 0 def + /tmp.dest_i 0 def + tmp.texts { + keep_it { + menu.args tmp.dest_i tmp.args tmp.i get put + menu.texts tmp.dest_i tmp.texts tmp.i get put + /tmp.dest_i tmp.dest_i 1 add def + } if + /tmp.i tmp.i 1 add def + } forall + + menu.texts menu.args +} def + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - % ( menu_entries_array cmdline_args_array defaultentry ) == > ( ) /MenuInit { bsplash.done @@ -473,6 +517,10 @@ /menu.entry -1 def /menu.dentry exch def + /menu.args.real exch def + /menu.texts.real exch def + + menu.texts.real menu.args.real filter_install_menu_items /menu.args exch def /menu.texts exch def |