This commit is contained in:
commit
68c67859a4
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
171
bootloader_entry
Normal file
171
bootloader_entry
Normal file
@ -0,0 +1,171 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This script represents an interface between the postinstall and postuninstall
|
||||
# scripts of kernel rpms and the update-bootloader script.
|
||||
#
|
||||
# Interface:
|
||||
# ----------
|
||||
# /usr/lib/bootloader/bootloader_entry [add|remove] <kernel-flavor> <kernel-release> <image-name> <initrd-name>
|
||||
#
|
||||
# Call Semantics:
|
||||
# ---------------
|
||||
# [ -x $cmd ] && $cmd <parameters>
|
||||
#
|
||||
#
|
||||
# Author: aosthof@suse.de
|
||||
#
|
||||
|
||||
|
||||
# Print how to use this script correctly
|
||||
function usage()
|
||||
{
|
||||
echo "Unknown or missing parameter."
|
||||
echo "Usage: $0 [add|remove] <kernel-flavor> <kernel-release> <image-name> <initrd-name>"
|
||||
echo
|
||||
echo "The old interface with 4 parameters is still supported, but deprecated."
|
||||
echo "This interface will be dropped in the near future."
|
||||
echo "Usage: $0 [add|remove] <kernel-package-name> <image-name> <initrd-name>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# Get all command line arguments
|
||||
function getargs()
|
||||
{
|
||||
# old interface with 4 parameters
|
||||
if [ $# -eq 4 ] ; then
|
||||
action=${1} # contains the action to be executed, e.g. "add" or "remove"
|
||||
flavor=${2#*-} # contains the kernel-flavor, e.g. "default" or "xen"
|
||||
flavor=${flavor%%-*}
|
||||
release=${2#*-*-} # contains the kernel-release, e.g. "2.6.18-4-default"
|
||||
release=${release%.*.*}
|
||||
release="${release}-${flavor}"
|
||||
image=${3} # contains the full image name, e.g. "vmlinuz-2.6.18-4-default"
|
||||
initrd=${4} # contains the full initrd name, e.g. "initrd-2.6.18-4-default"
|
||||
|
||||
# new interface with 5 parameters
|
||||
else
|
||||
action=${1} # contains the action to be executed, e.g. "add" or "remove"
|
||||
flavor=${2} # contains the kernel-flavor, e.g. "default" or "xen"
|
||||
release=${3} # contains the kernel-release, e.g. "2.6.18-4-default"
|
||||
image=${4} # contains the full image name, e.g. "vmlinuz-2.6.18-4-default"
|
||||
initrd=${5} # contains the full initrd name, e.g. "initrd-2.6.18-4-default"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Wrapper for the update-bootloader function
|
||||
function update_bootloader()
|
||||
{
|
||||
[ -x /sbin/update-bootloader -a "$YAST_IS_RUNNING" != instsys ] || return 0
|
||||
/sbin/update-bootloader "$@"
|
||||
}
|
||||
|
||||
|
||||
##############################
|
||||
# Add a new bootloader entry #
|
||||
##############################
|
||||
function add_entry()
|
||||
{
|
||||
# Set up the new kernel
|
||||
if [ "$YAST_IS_RUNNING" != instsys ]; then
|
||||
case $flavor in
|
||||
(kdump|um)
|
||||
;;
|
||||
(*)
|
||||
opt_xen_kernel=
|
||||
case $flavor in
|
||||
xen*)
|
||||
set -- $flavor
|
||||
set -- ${1#xen}
|
||||
opt_xen_kernel=--xen-kernel=/boot/xen${1:+-$1}.gz
|
||||
;;
|
||||
esac
|
||||
|
||||
# Add the new bootloader entry
|
||||
update_bootloader --image /boot/$image \
|
||||
--initrd /boot/$initrd \
|
||||
--default \
|
||||
--add \
|
||||
--force $opt_xen_kernel \
|
||||
--name "Kernel-$release"
|
||||
|
||||
# Run the bootloader (e.g., lilo).
|
||||
update_bootloader --refresh
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#######################################
|
||||
# Remove an existing bootloader entry #
|
||||
#######################################
|
||||
function remove_entry()
|
||||
{
|
||||
# Do not specify the name of a bootloader entry when removing it, thus
|
||||
# removing all sections matching the kernel image and initrd names
|
||||
# (either both a "linux" and a "failsafe" section, or a section
|
||||
# installed with the kernel postinstall script).
|
||||
#
|
||||
# Rationale: we do not know whether the old entry has
|
||||
# - the product name as its name (when installed with
|
||||
# yast-bootloader) or
|
||||
# - "Kernel-<version>" (when installed with the kernel package's
|
||||
# postinstall script and perl-Bootloader).
|
||||
#
|
||||
# So we cannot use the name to find the correct section.
|
||||
# This is safe, because on grub, this does still not match other
|
||||
# sections on other partitions with the same name for the kernel
|
||||
# image and initrd (because they will still have the (hdx,y) prefix
|
||||
# in perl-Bootloader). Other bootloaders do not specify other
|
||||
# sections at all, or do only chainload them (BootLILO.ycp), and
|
||||
# thus do not match either. (#223030)
|
||||
|
||||
|
||||
if [ $flavor == "xen" ]; then
|
||||
update_bootloader --image /boot/$image \
|
||||
--initrd /boot/$initrd \
|
||||
--xen \
|
||||
--remove \
|
||||
--force
|
||||
else
|
||||
update_bootloader --image /boot/$image \
|
||||
--initrd /boot/$initrd \
|
||||
--remove \
|
||||
--force
|
||||
fi
|
||||
|
||||
# Run the bootloader (e.g., lilo).
|
||||
update_bootloader --refresh
|
||||
}
|
||||
|
||||
|
||||
|
||||
##################### M A I N ###############################################
|
||||
|
||||
|
||||
# Checks if correct amount of arguments is given
|
||||
if [ "$#" -ne "4" -a "$#" -ne "5" ] ; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# Get all given arguments
|
||||
getargs $@
|
||||
|
||||
# Find out which action should be executed
|
||||
case $action in
|
||||
add)
|
||||
# Add a new bootloader entry
|
||||
add_entry
|
||||
;;
|
||||
remove)
|
||||
# Remove an existing bootloader entry
|
||||
remove_entry
|
||||
;;
|
||||
*)
|
||||
# Unknown argument
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
|
3
perl-Bootloader-0.4.8.tar.bz2
Normal file
3
perl-Bootloader-0.4.8.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f62036093f3f8152b22a8a4ed256ae22ddb9dfb0f4741e198f60dde1d68e3469
|
||||
size 39962
|
808
perl-Bootloader.changes
Normal file
808
perl-Bootloader.changes
Normal file
@ -0,0 +1,808 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 22 17:12:57 CET 2006 - aosthof@suse.de
|
||||
|
||||
- partial fix for ELILO (#228833)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 22 16:56:07 CET 2006 - jplack@suse.de
|
||||
|
||||
- complete implementation for (Fate#300732)
|
||||
- fix config file syntax problems from #228841
|
||||
- version bump 0.4.8
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 8 13:04:55 CET 2006 - jplack@suse.de
|
||||
|
||||
- fixed comment handling for ZIPL
|
||||
- basic implementation for generic bootloader widgets for ZIPL
|
||||
(Fate#300732)
|
||||
- basic implementation for generic bootloader widgets for ELILO
|
||||
(Fate#300732)
|
||||
- version bump 0.4.7
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 7 13:52:00 CET 2006 - aosthof@suse.de
|
||||
|
||||
- fixed identation (correct usage of tabs)
|
||||
- fixed remove_entry() that it removes xen entries correctly
|
||||
(#223576)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 30 15:42:48 CET 2006 - jplack@suse.de
|
||||
|
||||
- implement new section type menu neccessary for linking to other
|
||||
systems/ complexer multiboot setups
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 29 13:34:40 CET 2006 - jplack@suse.de
|
||||
|
||||
- handle xen sections correctly in update-bootloader (#224330)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 27 17:44:26 CET 2006 - od@suse.de
|
||||
|
||||
- do not specify the name of a bootloader entry when removing it
|
||||
with bootloader_entry, thus removing all sections matching the
|
||||
kernel image and initrd names (if these are on a currently
|
||||
mounted partition) (#223030)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 21 14:44:51 CET 2006 - jplack@suse.de
|
||||
|
||||
- fix mostly all remaining warnings (#222600)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 20 15:53:09 CET 2006 - jplack@suse.de
|
||||
|
||||
- fix various warnings (#222600)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 17 17:34:00 CET 2006 - jplack@suse.de
|
||||
|
||||
- some more finer fixes for the last entries stuff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 17 15:55:17 CET 2006 - jplack@suse.de
|
||||
|
||||
- kernel line and vga mode now editable again (#214875)
|
||||
- show most partitions in Custom Boot Partition drop-down list
|
||||
(#220283)
|
||||
- fix handling for chainloader sections (broken)
|
||||
- fix handling for xen sections (various problems, partial redesign
|
||||
neccessary)
|
||||
- boot from MBR does now address the first bios disk (#221204)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 17 14:57:43 CET 2006 - jplack@suse.de
|
||||
|
||||
- adding support for 'macos_timeout'
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 13 16:20:01 CET 2006 - jplack@suse.de
|
||||
|
||||
- use selectdevice type for "root" tag: may be given by-id as well
|
||||
- include logical partitions in list of custom boot devices
|
||||
(#213256)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 9 13:12:23 CET 2006 - aosthof@suse.de
|
||||
|
||||
- accept old arguments and new arguments in bootloader_entry
|
||||
- fixed usage() and did some cleanup
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 8 13:57:40 CET 2006 - schwab@suse.de
|
||||
|
||||
- Fix error checking.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 7 16:46:47 CET 2006 - aosthof@suse.de
|
||||
|
||||
- changed interface of bootloader_entry script to kernel rpm,
|
||||
no more second guessing.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 7 15:27:15 CET 2006 - jplack@suse.de
|
||||
|
||||
- fix implementation for grub.conf generation and parsing
|
||||
(FATE#300732, bug#213256)
|
||||
- version bump 0.4.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 31 15:47:35 CET 2006 - jplack@suse.de
|
||||
|
||||
- fix typo in Library.pm (#215613)
|
||||
- reduce build dependencies
|
||||
- version bump 0.3.5
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 31 00:33:15 CET 2006 - od@suse.de
|
||||
|
||||
- increase maximum timeout for grub to 3600 seconds (#214146)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 25 10:29:43 CEST 2006 - jplack@suse.de
|
||||
|
||||
- do error handling when $loader is not yet initialized (#213873)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 23 16:34:14 CEST 2006 - jplack@suse.de
|
||||
|
||||
- move GetMetaData call to the constructor (#213255)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 21 15:47:49 CEST 2006 - od@suse.de
|
||||
|
||||
- grub: using OO call for last fix (#213255)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 20 17:25:03 CEST 2006 - od@suse.de
|
||||
|
||||
- grub: fix writing globals (#213255)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 12 09:27:48 CEST 2006 - jplack@suse.de
|
||||
|
||||
- first chunk of changes for GRub using generic interface,
|
||||
grub.conf handling still missing
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 29 12:41:55 CEST 2006 - jplack@suse.de
|
||||
|
||||
- new interface for FATE#300732
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 28 15:47:23 CEST 2006 - aosthof@suse.de
|
||||
|
||||
- added new interface script bootloader_entry
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 19 17:29:38 CEST 2006 - jplack@suse.de
|
||||
|
||||
- fix man page for update-bootloader
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 4 17:15:19 CEST 2006 - jplack@suse.de
|
||||
|
||||
- support new options no_os_chooser and optional (#202069, #202072)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 4 17:00:54 CEST 2006 - jplack@suse.de
|
||||
|
||||
- remove braces when parsing device.map file (#203545)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 7 17:16:10 CEST 2006 - jplack@suse.de
|
||||
|
||||
- add requirement for 'mdadm' and 'e2fsprogs' (#197471)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 31 16:19:46 CEST 2006 - jplack@suse.de
|
||||
|
||||
- typo fix
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 28 17:40:51 CEST 2006 - jplack@suse.de
|
||||
|
||||
- Tools.pm@Udev2Dev : CCISS driver maps slashes to bangs so we
|
||||
have to reverse that, suppress ignorable warnings from udevinfo
|
||||
(#189348)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 25 14:17:40 CEST 2006 - jplack@suse.de
|
||||
|
||||
- do not use device symlink in sysfs as a criteria for device
|
||||
detection which breaks on SmartArray controllers (#189348)
|
||||
- bump version to 0.2.27
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 11 18:45:33 CEST 2006 - jplack@suse.de
|
||||
|
||||
- move Partition2Disk function to Grub.pm as the only place of
|
||||
usage and the only place to make it really work (#189348).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 6 20:00:28 CEST 2006 - jplack@suse.de
|
||||
|
||||
- do not replace section names of new sections by default section
|
||||
name (#190529)
|
||||
- do not interpret zero integer values as null string (#190529)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 3 23:18:44 CEST 2006 - jplack@suse.de
|
||||
|
||||
- several 'each' iterators for global hashes not properly reset.
|
||||
This broke root-on-raid1 support so far.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 3 20:40:11 CEST 2006 - jplack@suse.de
|
||||
|
||||
- fix CountSections/GetSectionList which always returned all
|
||||
sections
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 3 18:54:57 CEST 2006 - jplack@suse.de
|
||||
|
||||
- fix raid1 support in Tools.pm, still more problems in
|
||||
Grub.pm:GrubPath2UnixPath
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 3 12:23:58 CEST 2006 - jplack@suse.de
|
||||
|
||||
- fixed severe syntax problems introduced by r113&r111 in Tools.pm
|
||||
and broke update-bootloader
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 28 19:38:31 CEST 2006 - jplack@suse.de
|
||||
|
||||
- map kernel_append params to xen_append params (#188614) when
|
||||
having a serial console
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 28 19:32:25 CEST 2006 - jplack@suse.de
|
||||
|
||||
- be nicer while handling empty paths (#177083)
|
||||
- remove call to RealFileName which is called in SplitDevPath
|
||||
anyway
|
||||
- extended/reworked interface in Tools.pm, more generic functions
|
||||
those are needed for another tool needed to enable multipathing
|
||||
after install, add new entries
|
||||
- check for RAID1 md arrays as all others will break on reboot
|
||||
(#178802), fix mdadm call (RAID1 check)
|
||||
- changed name of ReadMDArrays to ReadRAID1Array which matches its
|
||||
intended functionality.
|
||||
- Added FIXME notes for mskibbe
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 30 15:04:15 CEST 2006 - jplack@suse.de
|
||||
|
||||
- fixed broken parsing/handling/reassembly esp. of comments in
|
||||
config files
|
||||
- fixed inline documentation for MD2Members
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 22 18:09:07 CEST 2006 - jplack@suse.de
|
||||
|
||||
- fix broken selection list (#167390)
|
||||
- bump version to 0.2.24
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 19 15:47:45 CEST 2006 - jplack@suse.de
|
||||
|
||||
- fix xen section counting when adding (#161559)
|
||||
- omit bogus warning (#165158)
|
||||
- move check for bool type to save code area (#175228)
|
||||
- do syntax checking for global "default" parameter. Has to be an
|
||||
integer (#174829)
|
||||
- bump version to 0.2.23
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 12 15:56:05 CEST 2006 - jplack@suse.de
|
||||
|
||||
- do not accept empty product string
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 12 14:22:12 CEST 2006 - jplack@suse.de
|
||||
|
||||
- call setlocale only when neccessary (helps with --refresh in
|
||||
instsys)
|
||||
- do not define opt_xen_kernel initially hence else all new entries
|
||||
will be xen entries.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 10 15:34:20 CEST 2006 - jplack@suse.de
|
||||
|
||||
- fix blocking bootloader issue (all archs) found by kukuk right
|
||||
now: bootloader config files are not moved to final destination
|
||||
and bootloader installation thus hangs complete install.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 9 13:05:37 CEST 2006 - jplack@suse.de
|
||||
|
||||
- follow symlinks for dev-by-id (#170588)
|
||||
- bump version to 0.2.21
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 19 19:34:52 CEST 2006 - agruen@suse.de
|
||||
|
||||
- Fix a bug in CountSections(), and be more specific in
|
||||
update-bootloader, even though it shouldn't be necessary with
|
||||
the fix.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 19 17:08:50 CEST 2006 - agruen@suse.de
|
||||
|
||||
- Change option --xen to --xen-kernel=... (161197).
|
||||
- Fix a bug when removing xen bootloader entries.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 12 18:11:46 CEST 2006 - sf@suse.de
|
||||
|
||||
- remove wrong dashes from update-bootloader
|
||||
- bump version to 0.2.20
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 12 16:47:23 CEST 2006 - od@suse.de
|
||||
|
||||
- make error checking for yast2 print-product independent of
|
||||
the contents of the product name
|
||||
- bump version to 0.2.19
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 7 17:03:05 CEST 2006 - jplack@suse.de
|
||||
|
||||
- changed update-bootloader semantic according to #164427
|
||||
- bump version to 0.2.18
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 3 20:15:35 CEST 2006 - jplack@suse.de
|
||||
|
||||
- extended interface to fix #161755
|
||||
- bump version to 0.2.17
|
||||
|
||||
------------------------------------------------------------------------
|
||||
Mon Mar 27 17:44:12 CEST 2006 - jplack@suse.de
|
||||
|
||||
- always regenerate our 'meta global' section to avoid #160595
|
||||
- bump version to 0.2.16
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 21 17:51:20 CET 2006 - jplack@suse.de
|
||||
|
||||
- added package dependency to perl-gettext (#159773)
|
||||
- add a fallback value of "SUSE Code 10" instead of error in
|
||||
function GetProduct
|
||||
- bump version to 0.2.15
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 21 14:10:18 CET 2006 - sf@suse.de
|
||||
|
||||
- use print-product.ycp again, fallback to /etc/SuSE-release
|
||||
if that doesn't work.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 17 17:15:49 CET 2006 - jplack@suse.de
|
||||
|
||||
- moved unification of section names in FixSectionName to Core.pm
|
||||
- altered loader specific code to use that (needed by #158274)
|
||||
- rearranged update-bootloader so that bootloader entry translation
|
||||
works again (#158274)
|
||||
- bump version to 0.2.14
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 15 17:35:56 CET 2006 - od@suse.de
|
||||
|
||||
- fix erroneous error message on ELILO installation (#156993)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 13 18:41:14 CET 2006 - jplack@suse.de
|
||||
|
||||
- create a nicer default for Xen
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 27 19:00:27 CET 2006 - jplack@suse.de
|
||||
|
||||
- change log file name for _all- archs to y2log_bootloader(#145106)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 23 19:44:27 CET 2006 - jplack@suse.de
|
||||
|
||||
- modified interface in Tools.pm to enable more generic chages to the
|
||||
bl config sections (#148461)
|
||||
- use new interface of Tools.pm for the xen case in update-bootloader
|
||||
(#148461)
|
||||
- bump version to 0.2.12
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 19 16:32:41 CET 2006 - agruen@suse.de
|
||||
|
||||
- update-bootloader: Only modify the section name if no explicit
|
||||
name is specified. Strip directories when generating a name from
|
||||
the image name.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 14 13:53:05 CET 2006 - jplack@suse.de
|
||||
|
||||
- implement new requirements/word split in FixSectionName
|
||||
- bump version to 0.2.11
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 13 18:56:56 CET 2006 - sf@suse.de
|
||||
|
||||
- workaround for broken Product.ycp (Bug #148625)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 10 18:50:26 CET 2006 - jplack@suse.de
|
||||
|
||||
- fix boot_*/stage1_dev tag handling which breaks kernel builds
|
||||
through update-bootloader, hopefully final checkin´ for FATE #2154
|
||||
- remove stage1_dev code for POWER
|
||||
- bump version to 0.2.10
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 9 13:41:56 CET 2006 - jplack@suse.de
|
||||
|
||||
- added help messages to make update-bootloader usuable
|
||||
- added error handling which was not there at all
|
||||
- added --force and --refresh option for FATE #2154
|
||||
- introduce Bootloader::Tools::UpdateBootloader(), no longer in
|
||||
Add/Remove Section functions
|
||||
- image name may be empty and stored either under "kernel" or "image"
|
||||
- bump version to 0.2.9
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 6 18:03:19 CET 2006 - jplack@suse.de
|
||||
|
||||
- catch cases wherethere is no key 'kernel' (FATE #2154)
|
||||
- create name and initrd only if not given via parameter
|
||||
- use functions to detect kernel/initrd
|
||||
- bump version to 0.2.8
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 6 11:53:55 CET 2006 - sf@suse.de
|
||||
|
||||
- get kernel/initrd name and path from default section
|
||||
- put GetSystemLanguage in Tools.pm
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 3 17:01:01 CET 2006 - sf@suse.de
|
||||
|
||||
- fix typo in image name
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 1 15:52:00 CET 2006 - od@suse.de
|
||||
|
||||
- update-bootloader changes from pth@suse.de and od@suse.de:
|
||||
- only grub allows blanks in section titles
|
||||
- for non-grub: restrict section title lenght to 16 chars
|
||||
- beautify code
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 1 14:42:26 CET 2006 - od@suse.de
|
||||
|
||||
- update-bootloader:
|
||||
- use /etc/sysconfig/language:RC_LANG
|
||||
- translated section name must be non-empty to be used
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 31 11:50:40 CET 2006 - sf@suse.de
|
||||
|
||||
- localize only on Grub or lilo
|
||||
- check if translated section name contains non-ASCII characters
|
||||
and fallback to english
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 25 21:39:29 CET 2006 - mls@suse.de
|
||||
|
||||
- converted neededforbuild to BuildRequires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 24 16:08:20 CET 2006 - jplack@suse.de
|
||||
|
||||
- added changes from pth for (FATE #2154)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 24 15:48:08 CET 2006 - jplack@suse.de
|
||||
|
||||
- handle entries for block devices in sysfs correctly. replaced
|
||||
heuristic term by a proper device and partition detection
|
||||
(FATE #2154)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 20 14:22:09 CET 2006 - jplack@suse.de
|
||||
|
||||
- defaultboot section must not be empty (#144321)
|
||||
- avoid colliding definition of default label in 'menu' and
|
||||
'defaultboot'
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 18 15:56:38 CET 2006 - jplack@suse.de
|
||||
|
||||
- add nice paranthesis to fix blocking yast2 crash (#143746)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 18 15:12:50 CET 2006 - rw@suse.de
|
||||
|
||||
- get rid of 'append=splash=silent" default
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 16 18:09:10 CET 2006 - jplack@suse.de
|
||||
|
||||
- fixed famous last typo
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 16 11:04:44 CET 2006 - jplack@suse.de
|
||||
|
||||
- unify format of type spec string, they alway start with type,
|
||||
desc, default now.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 11 11:31:00 CET 2006 - uli@suse.de
|
||||
|
||||
- ZIPL: take out the [defaultboot] garbage
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 3 14:59:45 CET 2006 - uli@suse.de
|
||||
|
||||
- ZIPL: implemented new UI scheme
|
||||
- ZIPL: actually use autogenerated boot menu
|
||||
- ZIPL: syntax fix in boot menu
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 20 13:53:21 CET 2005 - jplack@suse.de
|
||||
|
||||
- installer segfaults due to empty config (means always) #140127
|
||||
- bump version to 0.2.3
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 19 17:12:40 CET 2005 - jplack@suse.de
|
||||
|
||||
- add needed label text
|
||||
- bump version to 0.2.2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 16 09:49:15 CET 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed getting MD array info via mdadm (#137987)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 18 11:21:14 CET 2005 - jplack@suse.de
|
||||
|
||||
- extend partition information interface transparently
|
||||
- encode module exports and transport them through 'global'
|
||||
(intermediate solution/ proof of concept)
|
||||
- eliminate some unneeded 'system' calls
|
||||
- reenable ppc bootloader config
|
||||
- bump version to 0.2.1
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 31 10:50:08 CET 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed reading GRUB settings when /boot subtree is on MD array
|
||||
(#130236)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 26 09:18:20 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed updating elilo configuration (#116739)
|
||||
- do more verbose output to log when installing lilo
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 28 22:08:05 CEST 2005 - dmueller@suse.de
|
||||
|
||||
- add norootforbuild
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 27 10:44:50 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed quoting of options in lilo.conf (#117642)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 30 11:48:39 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- added ELILO support
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 29 21:56:45 CEST 2005 - aj@suse.de
|
||||
|
||||
- Do not package .orig file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 29 10:34:57 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- added support for PPC loader
|
||||
- fixed rootnoverify handling for GRUB (#113683)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 19 09:08:13 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed kernel/initrd specification in merged sections (#105660)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 18 13:52:52 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed order of lines in XEN sections (#105171)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 17 12:57:45 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed installing GRUB if /boot is on MD array (104908)
|
||||
- fixed displayed paths in configuration file editor during
|
||||
bootloader installation (105140)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 9 14:31:41 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed writing chainloader sections for GRUB (#102703)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 3 14:15:11 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed crashes if using on unsupported bootloader
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 2 11:25:11 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed crash in some cases
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 27 13:57:16 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- added possibility to set password
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 26 14:37:39 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed typo in function name
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 21 16:30:19 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed GRUB <-> UNIX path translations to make menus merging work
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 30 11:00:39 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed handling of wildcard sections
|
||||
- fixed determining whether bootloader initialization succeeded
|
||||
for LILO and ZIPL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 29 11:37:23 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed checking of labels for LILO
|
||||
- fixed creating global sections during distro installation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 2 16:01:16 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- use rootnoverify instead of root in chainloader sections (#84575)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 1 15:11:42 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- merged last patch to main tarball
|
||||
- fixed cripplink lilo.conf if detailed disk information is
|
||||
present (#81526)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 31 16:07:35 CEST 2005 - uli@suse.de
|
||||
|
||||
- fixed syntax error
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 23 14:17:34 CEST 2005 - uli@suse.de
|
||||
|
||||
- shift s390* ramdisk up to 16MB so it will not be overwritten
|
||||
on machines with many CPUs (bug #63045)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 15 11:31:10 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- added GRUB support for XEN
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 6 13:08:28 CEST 2005 - jsrain@suse.cz
|
||||
|
||||
- removed code duplication between generic and S/390 specific code
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 16 13:24:39 CET 2005 - jsrain@suse.cz
|
||||
|
||||
- added license to documentation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 14 09:33:56 CET 2005 - jsrain@suse.cz
|
||||
|
||||
- limit LILO section name length (#71830)
|
||||
- fixed setting default entry when GRUB section added (#71217)
|
||||
- make bootloader files not public readable (#72385)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 8 17:29:32 CET 2005 - jsrain@suse.de
|
||||
|
||||
- fixed creating zipl.conf during installation
|
||||
- added missing documentation in source code
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 7 15:36:11 CET 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed reading zip.conf (uli)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 2 15:17:03 CET 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed error message written on terminal while finishing
|
||||
installation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 25 16:07:39 CET 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed initialization when device specified via UUID or LABEL
|
||||
in /etc/fstab (#66623)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 25 14:31:11 CET 2005 - agruen@suse.de
|
||||
|
||||
- Add --default option to update-bootloader script.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 23 16:52:16 CET 2005 - ihno@suse.de
|
||||
|
||||
- added s390/s390x specific part (zipl)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 17 18:15:53 CET 2005 - jsrain@suse.cz
|
||||
|
||||
- avoid calling hwinfo when detecting partitioning (#50615)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 16 22:26:30 CET 2005 - schwab@suse.de
|
||||
|
||||
- Don't remove BuildRoot in %install.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 16 13:51:49 CET 2005 - jsrain@suse.cz
|
||||
|
||||
- added support for embedding stage1.5 of GRUB
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 14 09:36:36 CET 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed parameters of added kernel if the comment saying which
|
||||
kernel comes from initial installation is missing (#50708)
|
||||
- fixed errors if removing entry for unexistent kernel (#50708)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 7 10:43:00 CET 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed last patch (more entries can be removed with one kernel)
|
||||
- write only modified configuration files and modified sections
|
||||
- fixed splitting path to mountpoint + path relative to the mp
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 4 18:17:56 CET 2005 - agruen@suse.de
|
||||
|
||||
- Set the new default boot entry to the first entry in the boot
|
||||
menu when removing the current default entry.
|
||||
- A few minor code cleanups.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 4 15:56:00 CET 2005 - jsrain@suse.de
|
||||
|
||||
- fixed possible corruption of data files
|
||||
- fixed counting and removing sections with specified kernel
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 3 15:00:28 CET 2005 - agruen@suse.de
|
||||
|
||||
- Rename the man pages so that they include the Bootloader::
|
||||
prefix.
|
||||
- Fix a bug in Bootloader::Core::SplitDevPath.
|
||||
- Add update-bootloader frontend script.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 31 16:11:48 CET 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed several bugs
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 25 16:27:09 CET 2005 - jsrain@suse.cz
|
||||
|
||||
- fixed GRUB to work properly with MD arrays
|
||||
- fixed handlink of symlinks
|
||||
- fixed root device when creating a new section
|
||||
- implemented logging support when running without YaST
|
||||
- fixed handling of GRUB path prefix
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 24 17:35:27 CET 2005 - jsrain@suse.cz
|
||||
|
||||
- implemented logging mechanism
|
||||
- several bugfixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 20 16:21:27 CET 2005 - jsrain@suse.cz
|
||||
|
||||
- initial package
|
||||
|
480
perl-Bootloader.spec
Normal file
480
perl-Bootloader.spec
Normal file
@ -0,0 +1,480 @@
|
||||
#
|
||||
# spec file for package perl-Bootloader (Version 0.4.8)
|
||||
#
|
||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
Name: perl-Bootloader
|
||||
Version: 0.4.8
|
||||
Release: 1
|
||||
Requires: perl >= %{perl_version}
|
||||
Requires: perl-gettext
|
||||
Requires: mdadm e2fsprogs
|
||||
Requires: limal-bootloader >= 1.2.2
|
||||
Autoreqprov: on
|
||||
Group: System/Boot
|
||||
License: GNU General Public License (GPL)
|
||||
Summary: Library for Configuring Boot Loaders
|
||||
Source: perl-Bootloader-%{version}.tar.bz2
|
||||
Source1: update-bootloader
|
||||
Source2: bootloader_entry
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
#!BuildIgnore: mdadm e2fsprogs limal-bootloader
|
||||
|
||||
%description
|
||||
Perl modules for configuring various boot loaders.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Jiri Srain <jsrain@suse.cz>
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
touch Makefile.PL
|
||||
perl -MExtUtils::MakeMaker -e 'WriteMakefile (NAME => "Bootloader")'
|
||||
make
|
||||
|
||||
%install
|
||||
make DESTDIR=$RPM_BUILD_ROOT install_vendor
|
||||
%perl_process_packlist
|
||||
mkdir -p $RPM_BUILD_ROOT/sbin
|
||||
install -m 755 %_sourcedir/update-bootloader $RPM_BUILD_ROOT/sbin
|
||||
install -d -m 711 $RPM_BUILD_ROOT/usr/lib/bootloader
|
||||
install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/bootloader
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%doc COPYING
|
||||
%doc %{_mandir}/man?/*
|
||||
%{perl_vendorarch}/auto/Bootloader
|
||||
%{perl_vendorlib}/Bootloader
|
||||
/var/adm/perl-modules/perl-Bootloader
|
||||
/sbin/update-bootloader
|
||||
/usr/lib/bootloader
|
||||
|
||||
%changelog -n perl-Bootloader
|
||||
* Fri Dec 22 2006 - aosthof@suse.de
|
||||
- partial fix for ELILO (#228833)
|
||||
* Fri Dec 22 2006 - jplack@suse.de
|
||||
- complete implementation for (Fate#300732)
|
||||
- fix config file syntax problems from #228841
|
||||
- version bump 0.4.8
|
||||
* Fri Dec 08 2006 - jplack@suse.de
|
||||
- fixed comment handling for ZIPL
|
||||
- basic implementation for generic bootloader widgets for ZIPL
|
||||
(Fate#300732)
|
||||
- basic implementation for generic bootloader widgets for ELILO
|
||||
(Fate#300732)
|
||||
- version bump 0.4.7
|
||||
* Thu Dec 07 2006 - aosthof@suse.de
|
||||
- fixed identation (correct usage of tabs)
|
||||
- fixed remove_entry() that it removes xen entries correctly
|
||||
(#223576)
|
||||
* Thu Nov 30 2006 - jplack@suse.de
|
||||
- implement new section type menu neccessary for linking to other
|
||||
systems/ complexer multiboot setups
|
||||
* Wed Nov 29 2006 - jplack@suse.de
|
||||
- handle xen sections correctly in update-bootloader (#224330)
|
||||
* Mon Nov 27 2006 - od@suse.de
|
||||
- do not specify the name of a bootloader entry when removing it
|
||||
with bootloader_entry, thus removing all sections matching the
|
||||
kernel image and initrd names (if these are on a currently
|
||||
mounted partition) (#223030)
|
||||
* Tue Nov 21 2006 - jplack@suse.de
|
||||
- fix mostly all remaining warnings (#222600)
|
||||
* Mon Nov 20 2006 - jplack@suse.de
|
||||
- fix various warnings (#222600)
|
||||
* Fri Nov 17 2006 - jplack@suse.de
|
||||
- some more finer fixes for the last entries stuff
|
||||
* Fri Nov 17 2006 - jplack@suse.de
|
||||
- kernel line and vga mode now editable again (#214875)
|
||||
- show most partitions in Custom Boot Partition drop-down list
|
||||
(#220283)
|
||||
- fix handling for chainloader sections (broken)
|
||||
- fix handling for xen sections (various problems, partial redesign
|
||||
neccessary)
|
||||
- boot from MBR does now address the first bios disk (#221204)
|
||||
* Fri Nov 17 2006 - jplack@suse.de
|
||||
- adding support for 'macos_timeout'
|
||||
* Mon Nov 13 2006 - jplack@suse.de
|
||||
- use selectdevice type for "root" tag: may be given by-id as well
|
||||
- include logical partitions in list of custom boot devices
|
||||
(#213256)
|
||||
* Thu Nov 09 2006 - aosthof@suse.de
|
||||
- accept old arguments and new arguments in bootloader_entry
|
||||
- fixed usage() and did some cleanup
|
||||
* Wed Nov 08 2006 - schwab@suse.de
|
||||
- Fix error checking.
|
||||
* Tue Nov 07 2006 - aosthof@suse.de
|
||||
- changed interface of bootloader_entry script to kernel rpm,
|
||||
no more second guessing.
|
||||
* Tue Nov 07 2006 - jplack@suse.de
|
||||
- fix implementation for grub.conf generation and parsing
|
||||
(FATE#300732, bug#213256)
|
||||
- version bump 0.4.0
|
||||
* Tue Oct 31 2006 - jplack@suse.de
|
||||
- fix typo in Library.pm (#215613)
|
||||
- reduce build dependencies
|
||||
- version bump 0.3.5
|
||||
* Tue Oct 31 2006 - od@suse.de
|
||||
- increase maximum timeout for grub to 3600 seconds (#214146)
|
||||
* Wed Oct 25 2006 - jplack@suse.de
|
||||
- do error handling when $loader is not yet initialized (#213873)
|
||||
* Mon Oct 23 2006 - jplack@suse.de
|
||||
- move GetMetaData call to the constructor (#213255)
|
||||
* Sat Oct 21 2006 - od@suse.de
|
||||
- grub: using OO call for last fix (#213255)
|
||||
* Fri Oct 20 2006 - od@suse.de
|
||||
- grub: fix writing globals (#213255)
|
||||
* Thu Oct 12 2006 - jplack@suse.de
|
||||
- first chunk of changes for GRub using generic interface,
|
||||
grub.conf handling still missing
|
||||
* Fri Sep 29 2006 - jplack@suse.de
|
||||
- new interface for FATE#300732
|
||||
* Thu Sep 28 2006 - aosthof@suse.de
|
||||
- added new interface script bootloader_entry
|
||||
* Tue Sep 19 2006 - jplack@suse.de
|
||||
- fix man page for update-bootloader
|
||||
* Mon Sep 04 2006 - jplack@suse.de
|
||||
- support new options no_os_chooser and optional (#202069, #202072)
|
||||
* Mon Sep 04 2006 - jplack@suse.de
|
||||
- remove braces when parsing device.map file (#203545)
|
||||
* Mon Aug 07 2006 - jplack@suse.de
|
||||
- add requirement for 'mdadm' and 'e2fsprogs' (#197471)
|
||||
* Mon Jul 31 2006 - jplack@suse.de
|
||||
- typo fix
|
||||
* Fri Jul 28 2006 - jplack@suse.de
|
||||
- Tools.pm@Udev2Dev : CCISS driver maps slashes to bangs so we
|
||||
have to reverse that, suppress ignorable warnings from udevinfo
|
||||
(#189348)
|
||||
* Tue Jul 25 2006 - jplack@suse.de
|
||||
- do not use device symlink in sysfs as a criteria for device
|
||||
detection which breaks on SmartArray controllers (#189348)
|
||||
- bump version to 0.2.27
|
||||
* Tue Jul 11 2006 - jplack@suse.de
|
||||
- move Partition2Disk function to Grub.pm as the only place of
|
||||
usage and the only place to make it really work (#189348).
|
||||
* Thu Jul 06 2006 - jplack@suse.de
|
||||
- do not replace section names of new sections by default section
|
||||
name (#190529)
|
||||
- do not interpret zero integer values as null string (#190529)
|
||||
* Mon Jul 03 2006 - jplack@suse.de
|
||||
- several 'each' iterators for global hashes not properly reset.
|
||||
This broke root-on-raid1 support so far.
|
||||
* Mon Jul 03 2006 - jplack@suse.de
|
||||
- fix CountSections/GetSectionList which always returned all
|
||||
sections
|
||||
* Mon Jul 03 2006 - jplack@suse.de
|
||||
- fix raid1 support in Tools.pm, still more problems in
|
||||
Grub.pm:GrubPath2UnixPath
|
||||
* Mon Jul 03 2006 - jplack@suse.de
|
||||
- fixed severe syntax problems introduced by r113&r111 in Tools.pm
|
||||
and broke update-bootloader
|
||||
* Wed Jun 28 2006 - jplack@suse.de
|
||||
- map kernel_append params to xen_append params (#188614) when
|
||||
having a serial console
|
||||
* Wed Jun 28 2006 - jplack@suse.de
|
||||
- be nicer while handling empty paths (#177083)
|
||||
- remove call to RealFileName which is called in SplitDevPath
|
||||
anyway
|
||||
- extended/reworked interface in Tools.pm, more generic functions
|
||||
those are needed for another tool needed to enable multipathing
|
||||
after install, add new entries
|
||||
- check for RAID1 md arrays as all others will break on reboot
|
||||
(#178802), fix mdadm call (RAID1 check)
|
||||
- changed name of ReadMDArrays to ReadRAID1Array which matches its
|
||||
intended functionality.
|
||||
- Added FIXME notes for mskibbe
|
||||
* Tue May 30 2006 - jplack@suse.de
|
||||
- fixed broken parsing/handling/reassembly esp. of comments in
|
||||
config files
|
||||
- fixed inline documentation for MD2Members
|
||||
* Mon May 22 2006 - jplack@suse.de
|
||||
- fix broken selection list (#167390)
|
||||
- bump version to 0.2.24
|
||||
* Fri May 19 2006 - jplack@suse.de
|
||||
- fix xen section counting when adding (#161559)
|
||||
- omit bogus warning (#165158)
|
||||
- move check for bool type to save code area (#175228)
|
||||
- do syntax checking for global "default" parameter. Has to be an
|
||||
integer (#174829)
|
||||
- bump version to 0.2.23
|
||||
* Fri May 12 2006 - jplack@suse.de
|
||||
- do not accept empty product string
|
||||
* Fri May 12 2006 - jplack@suse.de
|
||||
- call setlocale only when neccessary (helps with --refresh in
|
||||
instsys)
|
||||
- do not define opt_xen_kernel initially hence else all new entries
|
||||
will be xen entries.
|
||||
* Wed May 10 2006 - jplack@suse.de
|
||||
- fix blocking bootloader issue (all archs) found by kukuk right
|
||||
now: bootloader config files are not moved to final destination
|
||||
and bootloader installation thus hangs complete install.
|
||||
* Tue May 09 2006 - jplack@suse.de
|
||||
- follow symlinks for dev-by-id (#170588)
|
||||
- bump version to 0.2.21
|
||||
* Wed Apr 19 2006 - agruen@suse.de
|
||||
- Fix a bug in CountSections(), and be more specific in
|
||||
update-bootloader, even though it shouldn't be necessary with
|
||||
the fix.
|
||||
* Wed Apr 19 2006 - agruen@suse.de
|
||||
- Change option --xen to --xen-kernel=... (161197).
|
||||
- Fix a bug when removing xen bootloader entries.
|
||||
* Wed Apr 12 2006 - sf@suse.de
|
||||
- remove wrong dashes from update-bootloader
|
||||
- bump version to 0.2.20
|
||||
* Wed Apr 12 2006 - od@suse.de
|
||||
- make error checking for yast2 print-product independent of
|
||||
the contents of the product name
|
||||
- bump version to 0.2.19
|
||||
* Fri Apr 07 2006 - jplack@suse.de
|
||||
- changed update-bootloader semantic according to #164427
|
||||
- bump version to 0.2.18
|
||||
* Mon Apr 03 2006 - jplack@suse.de
|
||||
- extended interface to fix #161755
|
||||
- bump version to 0.2.17
|
||||
* Mon Mar 27 2006 - jplack@suse.de
|
||||
- always regenerate our 'meta global' section to avoid #160595
|
||||
- bump version to 0.2.16
|
||||
* Tue Mar 21 2006 - jplack@suse.de
|
||||
- added package dependency to perl-gettext (#159773)
|
||||
- add a fallback value of "SUSE Code 10" instead of error in
|
||||
function GetProduct
|
||||
- bump version to 0.2.15
|
||||
* Tue Mar 21 2006 - sf@suse.de
|
||||
- use print-product.ycp again, fallback to /etc/SuSE-release
|
||||
if that doesn't work.
|
||||
* Fri Mar 17 2006 - jplack@suse.de
|
||||
- moved unification of section names in FixSectionName to Core.pm
|
||||
- altered loader specific code to use that (needed by #158274)
|
||||
- rearranged update-bootloader so that bootloader entry translation
|
||||
works again (#158274)
|
||||
- bump version to 0.2.14
|
||||
* Wed Mar 15 2006 - od@suse.de
|
||||
- fix erroneous error message on ELILO installation (#156993)
|
||||
* Mon Mar 13 2006 - jplack@suse.de
|
||||
- create a nicer default for Xen
|
||||
* Mon Feb 27 2006 - jplack@suse.de
|
||||
- change log file name for _all- archs to y2log_bootloader(#145106)
|
||||
* Thu Feb 23 2006 - jplack@suse.de
|
||||
- modified interface in Tools.pm to enable more generic chages to the
|
||||
bl config sections (#148461)
|
||||
- use new interface of Tools.pm for the xen case in update-bootloader
|
||||
(#148461)
|
||||
- bump version to 0.2.12
|
||||
* Sun Feb 19 2006 - agruen@suse.de
|
||||
- update-bootloader: Only modify the section name if no explicit
|
||||
name is specified. Strip directories when generating a name from
|
||||
the image name.
|
||||
* Tue Feb 14 2006 - jplack@suse.de
|
||||
- implement new requirements/word split in FixSectionName
|
||||
- bump version to 0.2.11
|
||||
* Mon Feb 13 2006 - sf@suse.de
|
||||
- workaround for broken Product.ycp (Bug #148625)
|
||||
* Fri Feb 10 2006 - jplack@suse.de
|
||||
- fix boot_*/stage1_dev tag handling which breaks kernel builds
|
||||
through update-bootloader, hopefully final checkin´ for FATE #2154
|
||||
- remove stage1_dev code for POWER
|
||||
- bump version to 0.2.10
|
||||
* Thu Feb 09 2006 - jplack@suse.de
|
||||
- added help messages to make update-bootloader usuable
|
||||
- added error handling which was not there at all
|
||||
- added --force and --refresh option for FATE #2154
|
||||
- introduce Bootloader::Tools::UpdateBootloader(), no longer in
|
||||
Add/Remove Section functions
|
||||
- image name may be empty and stored either under "kernel" or "image"
|
||||
- bump version to 0.2.9
|
||||
* Mon Feb 06 2006 - jplack@suse.de
|
||||
- catch cases wherethere is no key 'kernel' (FATE #2154)
|
||||
- create name and initrd only if not given via parameter
|
||||
- use functions to detect kernel/initrd
|
||||
- bump version to 0.2.8
|
||||
* Mon Feb 06 2006 - sf@suse.de
|
||||
- get kernel/initrd name and path from default section
|
||||
- put GetSystemLanguage in Tools.pm
|
||||
* Fri Feb 03 2006 - sf@suse.de
|
||||
- fix typo in image name
|
||||
* Wed Feb 01 2006 - od@suse.de
|
||||
- update-bootloader changes from pth@suse.de and od@suse.de:
|
||||
- only grub allows blanks in section titles
|
||||
- for non-grub: restrict section title lenght to 16 chars
|
||||
- beautify code
|
||||
* Wed Feb 01 2006 - od@suse.de
|
||||
- update-bootloader:
|
||||
- use /etc/sysconfig/language:RC_LANG
|
||||
- translated section name must be non-empty to be used
|
||||
* Tue Jan 31 2006 - sf@suse.de
|
||||
- localize only on Grub or lilo
|
||||
- check if translated section name contains non-ASCII characters
|
||||
and fallback to english
|
||||
* Wed Jan 25 2006 - mls@suse.de
|
||||
- converted neededforbuild to BuildRequires
|
||||
* Tue Jan 24 2006 - jplack@suse.de
|
||||
- added changes from pth for (FATE #2154)
|
||||
* Tue Jan 24 2006 - jplack@suse.de
|
||||
- handle entries for block devices in sysfs correctly. replaced
|
||||
heuristic term by a proper device and partition detection
|
||||
(FATE #2154)
|
||||
* Fri Jan 20 2006 - jplack@suse.de
|
||||
- defaultboot section must not be empty (#144321)
|
||||
- avoid colliding definition of default label in 'menu' and
|
||||
'defaultboot'
|
||||
* Wed Jan 18 2006 - jplack@suse.de
|
||||
- add nice paranthesis to fix blocking yast2 crash (#143746)
|
||||
* Wed Jan 18 2006 - rw@suse.de
|
||||
- get rid of 'append=splash=silent" default
|
||||
* Mon Jan 16 2006 - jplack@suse.de
|
||||
- fixed famous last typo
|
||||
* Mon Jan 16 2006 - jplack@suse.de
|
||||
- unify format of type spec string, they alway start with type,
|
||||
desc, default now.
|
||||
* Wed Jan 11 2006 - uli@suse.de
|
||||
- ZIPL: take out the [defaultboot] garbage
|
||||
* Tue Jan 03 2006 - uli@suse.de
|
||||
- ZIPL: implemented new UI scheme
|
||||
- ZIPL: actually use autogenerated boot menu
|
||||
- ZIPL: syntax fix in boot menu
|
||||
* Tue Dec 20 2005 - jplack@suse.de
|
||||
- installer segfaults due to empty config (means always) #140127
|
||||
- bump version to 0.2.3
|
||||
* Mon Dec 19 2005 - jplack@suse.de
|
||||
- add needed label text
|
||||
- bump version to 0.2.2
|
||||
* Fri Dec 16 2005 - jsrain@suse.cz
|
||||
- fixed getting MD array info via mdadm (#137987)
|
||||
* Fri Nov 18 2005 - jplack@suse.de
|
||||
- extend partition information interface transparently
|
||||
- encode module exports and transport them through 'global'
|
||||
(intermediate solution/ proof of concept)
|
||||
- eliminate some unneeded 'system' calls
|
||||
- reenable ppc bootloader config
|
||||
- bump version to 0.2.1
|
||||
* Mon Oct 31 2005 - jsrain@suse.cz
|
||||
- fixed reading GRUB settings when /boot subtree is on MD array
|
||||
(#130236)
|
||||
* Wed Oct 26 2005 - jsrain@suse.cz
|
||||
- fixed updating elilo configuration (#116739)
|
||||
- do more verbose output to log when installing lilo
|
||||
* Wed Sep 28 2005 - dmueller@suse.de
|
||||
- add norootforbuild
|
||||
* Tue Sep 27 2005 - jsrain@suse.cz
|
||||
- fixed quoting of options in lilo.conf (#117642)
|
||||
* Tue Aug 30 2005 - jsrain@suse.cz
|
||||
- added ELILO support
|
||||
* Mon Aug 29 2005 - aj@suse.de
|
||||
- Do not package .orig file.
|
||||
* Mon Aug 29 2005 - jsrain@suse.cz
|
||||
- added support for PPC loader
|
||||
- fixed rootnoverify handling for GRUB (#113683)
|
||||
* Fri Aug 19 2005 - jsrain@suse.cz
|
||||
- fixed kernel/initrd specification in merged sections (#105660)
|
||||
* Thu Aug 18 2005 - jsrain@suse.cz
|
||||
- fixed order of lines in XEN sections (#105171)
|
||||
* Wed Aug 17 2005 - jsrain@suse.cz
|
||||
- fixed installing GRUB if /boot is on MD array (104908)
|
||||
- fixed displayed paths in configuration file editor during
|
||||
bootloader installation (105140)
|
||||
* Tue Aug 09 2005 - jsrain@suse.cz
|
||||
- fixed writing chainloader sections for GRUB (#102703)
|
||||
* Wed Aug 03 2005 - jsrain@suse.cz
|
||||
- fixed crashes if using on unsupported bootloader
|
||||
* Tue Aug 02 2005 - jsrain@suse.cz
|
||||
- fixed crash in some cases
|
||||
* Wed Jul 27 2005 - jsrain@suse.cz
|
||||
- added possibility to set password
|
||||
* Tue Jul 26 2005 - jsrain@suse.cz
|
||||
- fixed typo in function name
|
||||
* Thu Jul 21 2005 - jsrain@suse.cz
|
||||
- fixed GRUB <-> UNIX path translations to make menus merging work
|
||||
* Thu Jun 30 2005 - jsrain@suse.cz
|
||||
- fixed handling of wildcard sections
|
||||
- fixed determining whether bootloader initialization succeeded
|
||||
for LILO and ZIPL
|
||||
* Wed Jun 29 2005 - jsrain@suse.cz
|
||||
- fixed checking of labels for LILO
|
||||
- fixed creating global sections during distro installation
|
||||
* Thu Jun 02 2005 - jsrain@suse.cz
|
||||
- use rootnoverify instead of root in chainloader sections (#84575)
|
||||
* Wed Jun 01 2005 - jsrain@suse.cz
|
||||
- merged last patch to main tarball
|
||||
- fixed cripplink lilo.conf if detailed disk information is
|
||||
present (#81526)
|
||||
* Tue May 31 2005 - uli@suse.de
|
||||
- fixed syntax error
|
||||
* Mon May 23 2005 - uli@suse.de
|
||||
- shift s390* ramdisk up to 16MB so it will not be overwritten
|
||||
on machines with many CPUs (bug #63045)
|
||||
* Fri Apr 15 2005 - jsrain@suse.cz
|
||||
- added GRUB support for XEN
|
||||
* Wed Apr 06 2005 - jsrain@suse.cz
|
||||
- removed code duplication between generic and S/390 specific code
|
||||
* Wed Mar 16 2005 - jsrain@suse.cz
|
||||
- added license to documentation
|
||||
* Mon Mar 14 2005 - jsrain@suse.cz
|
||||
- limit LILO section name length (#71830)
|
||||
- fixed setting default entry when GRUB section added (#71217)
|
||||
- make bootloader files not public readable (#72385)
|
||||
* Tue Mar 08 2005 - jsrain@suse.de
|
||||
- fixed creating zipl.conf during installation
|
||||
- added missing documentation in source code
|
||||
* Mon Mar 07 2005 - jsrain@suse.cz
|
||||
- fixed reading zip.conf (uli)
|
||||
* Wed Mar 02 2005 - jsrain@suse.cz
|
||||
- fixed error message written on terminal while finishing
|
||||
installation
|
||||
* Fri Feb 25 2005 - jsrain@suse.cz
|
||||
- fixed initialization when device specified via UUID or LABEL
|
||||
in /etc/fstab (#66623)
|
||||
* Fri Feb 25 2005 - agruen@suse.de
|
||||
- Add --default option to update-bootloader script.
|
||||
* Wed Feb 23 2005 - ihno@suse.de
|
||||
- added s390/s390x specific part (zipl)
|
||||
* Thu Feb 17 2005 - jsrain@suse.cz
|
||||
- avoid calling hwinfo when detecting partitioning (#50615)
|
||||
* Wed Feb 16 2005 - schwab@suse.de
|
||||
- Don't remove BuildRoot in %%install.
|
||||
* Wed Feb 16 2005 - jsrain@suse.cz
|
||||
- added support for embedding stage1.5 of GRUB
|
||||
* Mon Feb 14 2005 - jsrain@suse.cz
|
||||
- fixed parameters of added kernel if the comment saying which
|
||||
kernel comes from initial installation is missing (#50708)
|
||||
- fixed errors if removing entry for unexistent kernel (#50708)
|
||||
* Mon Feb 07 2005 - jsrain@suse.cz
|
||||
- fixed last patch (more entries can be removed with one kernel)
|
||||
- write only modified configuration files and modified sections
|
||||
- fixed splitting path to mountpoint + path relative to the mp
|
||||
* Fri Feb 04 2005 - agruen@suse.de
|
||||
- Set the new default boot entry to the first entry in the boot
|
||||
menu when removing the current default entry.
|
||||
- A few minor code cleanups.
|
||||
* Fri Feb 04 2005 - jsrain@suse.de
|
||||
- fixed possible corruption of data files
|
||||
- fixed counting and removing sections with specified kernel
|
||||
* Thu Feb 03 2005 - agruen@suse.de
|
||||
- Rename the man pages so that they include the Bootloader::
|
||||
prefix.
|
||||
- Fix a bug in Bootloader::Core::SplitDevPath.
|
||||
- Add update-bootloader frontend script.
|
||||
* Mon Jan 31 2005 - jsrain@suse.cz
|
||||
- fixed several bugs
|
||||
* Tue Jan 25 2005 - jsrain@suse.cz
|
||||
- fixed GRUB to work properly with MD arrays
|
||||
- fixed handlink of symlinks
|
||||
- fixed root device when creating a new section
|
||||
- implemented logging support when running without YaST
|
||||
- fixed handling of GRUB path prefix
|
||||
* Mon Jan 24 2005 - jsrain@suse.cz
|
||||
- implemented logging mechanism
|
||||
- several bugfixes
|
||||
* Thu Jan 20 2005 - jsrain@suse.cz
|
||||
- initial package
|
294
update-bootloader
Normal file
294
update-bootloader
Normal file
@ -0,0 +1,294 @@
|
||||
#! /usr/bin/perl
|
||||
|
||||
use POSIX;
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
use Bootloader::Tools;
|
||||
use Locale::gettext;
|
||||
use strict;
|
||||
|
||||
my %oper;
|
||||
my ($opt_default, $opt_force, $opt_help, $opt_man, $opt_previous, $opt_xen)
|
||||
= (0,0,0,0,0,0);
|
||||
my ($opt_image, $opt_initrd, $opt_name, $opt_xen_kernel) = ('','','',undef);
|
||||
my $add_product = 0;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
update-bootloader - update/change bootloader configuration using
|
||||
Bootloader::Tools perl module
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
update-bootloader [operation] [options]
|
||||
|
||||
operation is one of --add, --remove or --refresh.
|
||||
|
||||
valid options are --help, --man, --image <file>, --initrd <file>,
|
||||
--xen-kernel <file>, --xen, --default, --previous, --name <string>, --force.
|
||||
|
||||
=head1 OPERATIONS
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--add>
|
||||
|
||||
add an new image section.
|
||||
Needs a call to --refresh to take effect.
|
||||
|
||||
=item B<--remove>
|
||||
|
||||
remove the specified image section.
|
||||
Needs a call to --refresh to take effect.
|
||||
|
||||
=item B<--refresh>
|
||||
|
||||
activate the new config e.g. write boot loader to disk
|
||||
|
||||
|
||||
=head1 PARAMETER
|
||||
|
||||
=item B<--help>
|
||||
|
||||
Print a brief help message and exits.
|
||||
|
||||
=item B<--man>
|
||||
|
||||
Prints the manual page and exits.
|
||||
|
||||
=item B<--image> F<file>
|
||||
|
||||
specify path to kernel image
|
||||
|
||||
=item B<--initrd> F<file>
|
||||
|
||||
specify path to initrd file
|
||||
|
||||
=item B<--xen>
|
||||
|
||||
specify that you what to add a xen and not a regular image section
|
||||
|
||||
=item B<--xen-kernel> F<file>
|
||||
|
||||
specify that you what to add a xen section with a specific image.
|
||||
Implies --xen option.
|
||||
|
||||
=item B<--default>
|
||||
|
||||
let the new section to be added be the default section. Only allowed together
|
||||
with --add operation
|
||||
|
||||
=item B<--previous>
|
||||
|
||||
set some usuable defaults for image, initrd and name when
|
||||
|
||||
=item B<--name> F<string>
|
||||
|
||||
specify the name of the section to be added/removed
|
||||
|
||||
=item B<--force>
|
||||
|
||||
dont complain, just do the right thing
|
||||
|
||||
=back
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<update-bootloader> will let you modify your bootloader configuration using
|
||||
Bootloader::Tools perl module.
|
||||
|
||||
=cut
|
||||
|
||||
# Get product name and version
|
||||
# FIXME: There is still no guaranteed-to-work solution
|
||||
# FIXME: as Commandline:: always prints to stderr, which is risky
|
||||
# FIXME: to get garbage.
|
||||
# If Commandline:: prints garbage, use /etc/SuSE-release instead
|
||||
|
||||
sub GetProduct {
|
||||
my $namever;
|
||||
|
||||
# First try: Does yast work these days?
|
||||
$namever = `yast2 print-product 2>&1`;
|
||||
chomp $namever;
|
||||
return "$namever" if $namever != '' and $namever !~ /\n/;
|
||||
|
||||
# Second try: Is there a usable /etc/SuSE-release?
|
||||
if (open(RELEASE, "</etc/SuSE-release")) {
|
||||
# first line is sufficient
|
||||
$namever = <RELEASE>;
|
||||
$namever =~ s/\s*\(.*//; # delete everything starting with the first parenthesis
|
||||
close(RELEASE);
|
||||
return "$namever";
|
||||
}
|
||||
|
||||
# the last line of defense ...
|
||||
return "SUSE Code10";
|
||||
}
|
||||
|
||||
|
||||
GetOptions (\%oper,
|
||||
'add|a' ,
|
||||
'refresh' ,
|
||||
'remove|r' ,
|
||||
'default|d' => \$opt_default,
|
||||
'help|h' => \$opt_help,
|
||||
'force' => \$opt_force,
|
||||
'image=s' => \$opt_image,
|
||||
'initrd=s' => \$opt_initrd,
|
||||
'man|m' => \$opt_man,
|
||||
'xen' => \$opt_xen,
|
||||
'xen-kernel=s' => \$opt_xen_kernel,
|
||||
'name=s' => \$opt_name,
|
||||
'previous|p' => \$opt_previous)
|
||||
or pod2usage(2);
|
||||
pod2usage(1) if $opt_help;
|
||||
pod2usage(-exitstatus => 0, -verbose => 2) if $opt_man;
|
||||
|
||||
pod2usage("Specify exactly one operation, either 'add', 'remove' or 'refresh'")
|
||||
unless scalar keys(%oper) == 1;
|
||||
|
||||
pod2usage("Option 'default' is only allowed for operation 'add'")
|
||||
if ($opt_default and not defined $oper{add});
|
||||
|
||||
if ($opt_image and $opt_image !~ m;^/;) {
|
||||
$opt_image = getcwd . '/' . $opt_image
|
||||
}
|
||||
if ($opt_initrd and $opt_initrd !~ m;^/;) {
|
||||
$opt_initrd = getcwd . '/' . $opt_initrd;
|
||||
}
|
||||
|
||||
if (defined $opt_xen_kernel) {
|
||||
$opt_xen = 1;
|
||||
} elsif ($opt_xen) {
|
||||
$opt_xen_kernel = "/boot/xen.gz";
|
||||
}
|
||||
my $type = $opt_xen ? "xen" : "image";
|
||||
|
||||
InitLibrary();
|
||||
|
||||
|
||||
if ($opt_previous) {
|
||||
unless ($opt_image) {
|
||||
$opt_image = GetDefaultImage() . ".previous";
|
||||
}
|
||||
unless($opt_initrd) {
|
||||
$opt_initrd = GetDefaultInitrd() . ".previous";
|
||||
}
|
||||
}
|
||||
|
||||
# FIXME: these section names should be unified somehow together with multi
|
||||
# language and grafical menu handling
|
||||
if (defined $oper{add}) {
|
||||
my $loader = Bootloader::Tools::GetBootloader();
|
||||
|
||||
unless ($opt_name) {
|
||||
if ($opt_xen and $opt_previous) {
|
||||
if ($loader eq "grub" || $loader eq "lilo") {
|
||||
$opt_name = "Previous Xen";
|
||||
$add_product = 1;
|
||||
}
|
||||
else {
|
||||
$opt_name = "previous xen";
|
||||
}
|
||||
}
|
||||
elsif ($opt_xen) {
|
||||
if ($loader eq "grub" || $loader eq "lilo") {
|
||||
$opt_name = "Xen";
|
||||
$add_product = 1;
|
||||
}
|
||||
else {
|
||||
$opt_name = "xen";
|
||||
}
|
||||
}
|
||||
elsif ($opt_previous) {
|
||||
if ($loader eq "grub" || $loader eq "lilo") {
|
||||
$opt_name = "Previous Kernel";
|
||||
$add_product = 1;
|
||||
}
|
||||
else {
|
||||
$opt_name = "previous";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$opt_name = $opt_image;
|
||||
$opt_name =~ s/.*\///;
|
||||
}
|
||||
}
|
||||
|
||||
# only localize on grub and lilo
|
||||
if ($loader eq "grub" || $loader eq "lilo") {
|
||||
setlocale(LC_MESSAGES, Bootloader::Tools::GetSystemLanguage());
|
||||
|
||||
my $d = Locale::gettext->domain("bootloader");
|
||||
$d->dir("/usr/share/YaST2/locale");
|
||||
my $opt_trans = $d->get($opt_name);
|
||||
chomp ($opt_trans);
|
||||
|
||||
# check whether translation only contains [a-zA-Z0-9 _]
|
||||
# otherwise fall back to untranslated string
|
||||
if ($opt_trans =~ /^[a-zA-Z\d _]+$/g ) {
|
||||
$opt_name = $opt_trans;
|
||||
}
|
||||
}
|
||||
$opt_name .= " -- " . GetProduct() if $add_product;
|
||||
}
|
||||
|
||||
#
|
||||
# execute selected operation
|
||||
#
|
||||
if (defined $oper{add}) {
|
||||
pod2usage("Please specify name and kernel image for new section")
|
||||
unless $opt_name and $opt_image;
|
||||
|
||||
my @params = (
|
||||
type => $type,
|
||||
image => $opt_image,
|
||||
);
|
||||
if (CountSections(@params) != 0)
|
||||
{
|
||||
if (not $opt_force) {
|
||||
pod2usage("There are already sections with image '$opt_image'");
|
||||
}
|
||||
} else {
|
||||
push @params, default => $opt_default;
|
||||
push @params, xen => $opt_xen_kernel if $type eq "xen";
|
||||
push @params, initrd => $opt_initrd if $opt_initrd;
|
||||
|
||||
AddSection($opt_name, @params);
|
||||
}
|
||||
}
|
||||
|
||||
if (defined $oper{remove}) {
|
||||
my @params = (
|
||||
type => $type,
|
||||
image => $opt_image,
|
||||
);
|
||||
push @params, xen => $opt_xen_kernel if $type eq "xen";
|
||||
push @params, initrd => $opt_initrd if $opt_initrd;
|
||||
push @params, name => $opt_name if $opt_name;
|
||||
|
||||
my $num = CountSections(@params);
|
||||
if ($num > 0) {
|
||||
if ($num > 1 and not $opt_force) {
|
||||
pod2usage("There is more than one section with image '$opt_image'");
|
||||
} else {
|
||||
RemoveSections(@params);
|
||||
}
|
||||
} elsif (not $opt_force) {
|
||||
pod2usage("There is no section with image '$opt_image'");
|
||||
}
|
||||
}
|
||||
|
||||
if (defined $oper{refresh}) {
|
||||
UpdateBootloader();
|
||||
}
|
||||
|
||||
#
|
||||
# Local variables:
|
||||
# mode: perl
|
||||
# mode: font-lock
|
||||
# mode: auto-fill
|
||||
# fill-column: 78
|
||||
# End:
|
||||
#
|
Loading…
x
Reference in New Issue
Block a user