This commit is contained in:
parent
3f07f13c13
commit
0abf55cef8
@ -73,6 +73,24 @@ function add_entry()
|
|||||||
{
|
{
|
||||||
echo "bootloader_entry: This is function add_entry()" >> $logname
|
echo "bootloader_entry: This is function add_entry()" >> $logname
|
||||||
|
|
||||||
|
# If running in instsys, write command(s) to be executed in a file
|
||||||
|
# which will be executed by yast2-bootloader after installation of
|
||||||
|
# packages is finished.
|
||||||
|
#
|
||||||
|
# This is to prevent inconsistencies triggered by libata migration.
|
||||||
|
|
||||||
|
if [ "$YAST_IS_RUNNING" == instsys -a "$DELAYED_RUN_UPDATE_BOOTLOADER" != yes ]; then
|
||||||
|
cat - >> $delayed_exec_file <<-EOF
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
export DELAYED_RUN_UPDATE_BOOTLOADER=yes
|
||||||
|
|
||||||
|
/usr/lib/bootloader/bootloader_entry $@
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod 755 $delayed_exec_file
|
||||||
|
else
|
||||||
# Set up the new kernel
|
# Set up the new kernel
|
||||||
if [ -f /etc/sysconfig/bootloader ] &&
|
if [ -f /etc/sysconfig/bootloader ] &&
|
||||||
[ -f /boot/grub/menu.lst -o \
|
[ -f /boot/grub/menu.lst -o \
|
||||||
@ -126,6 +144,7 @@ function add_entry()
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -140,11 +159,9 @@ function remove_entry()
|
|||||||
# which will be executed by yast2-bootloader after installation of
|
# which will be executed by yast2-bootloader after installation of
|
||||||
# packages is finished.
|
# packages is finished.
|
||||||
#
|
#
|
||||||
# This is to prevent inconsistencies triggered by libata merge.
|
# This is to prevent inconsistencies triggered by libata migration.
|
||||||
|
|
||||||
if [ "$YAST_IS_RUNNING" == instsys -a "$DELAYED_RUN_UPDATE_BOOTLOADER" != yes ]; then
|
if [ "$YAST_IS_RUNNING" == instsys -a "$DELAYED_RUN_UPDATE_BOOTLOADER" != yes ]; then
|
||||||
delayed_exec_file="/boot/perl-BL_delayed_exec"
|
|
||||||
|
|
||||||
cat - >> $delayed_exec_file <<-EOF
|
cat - >> $delayed_exec_file <<-EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
@ -206,17 +223,34 @@ echo "bootloader_entry was called as: $*" >> $logname
|
|||||||
(
|
(
|
||||||
echo "/proc/mounts:"
|
echo "/proc/mounts:"
|
||||||
cat /proc/mounts
|
cat /proc/mounts
|
||||||
|
echo
|
||||||
|
|
||||||
echo "/sys:"
|
echo "/sys:"
|
||||||
ls -l /sys
|
ls -l /sys
|
||||||
|
echo
|
||||||
|
|
||||||
|
fstab="/etc/fstab"
|
||||||
|
if [ -e $fstab ] ; then
|
||||||
|
echo "fstab:"
|
||||||
|
cat $fstab
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
echo "excerpts of /dev:"
|
echo "excerpts of /dev:"
|
||||||
ls -l /dev/{[hs]d[ab]?,md[0-3],.udev}
|
ls -l /dev/{[hs]d[ab]?,md[0-3],.udev}
|
||||||
|
echo
|
||||||
|
|
||||||
device_map="/boot/grub/device.map"
|
device_map="/boot/grub/device.map"
|
||||||
if [ -e $device_map ] ; then
|
if [ -e $device_map ] ; then
|
||||||
echo "device.map:"
|
echo "device.map:"
|
||||||
cat $device_map
|
cat $device_map
|
||||||
|
echo
|
||||||
fi
|
fi
|
||||||
) >> $logname
|
) >> $logname
|
||||||
|
|
||||||
|
# File containing commands for later execution
|
||||||
|
delayed_exec_file="/boot/perl-BL_delayed_exec"
|
||||||
|
|
||||||
# Checks if correct amount of arguments is given
|
# Checks if correct amount of arguments is given
|
||||||
if [ "$#" -ne "4" -a "$#" -ne "5" ] ; then
|
if [ "$#" -ne "4" -a "$#" -ne "5" ] ; then
|
||||||
usage
|
usage
|
||||||
@ -229,7 +263,7 @@ getargs $@
|
|||||||
case $action in
|
case $action in
|
||||||
add)
|
add)
|
||||||
# Add a new bootloader entry
|
# Add a new bootloader entry
|
||||||
add_entry
|
add_entry "$@"
|
||||||
;;
|
;;
|
||||||
remove)
|
remove)
|
||||||
# Remove an existing bootloader entry
|
# Remove an existing bootloader entry
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:4292b09e730694e3c976a6abe68678dd328c52f50bb390462423ed9bd2c7ebf6
|
oid sha256:54577253768998fa4a8d4e6b3b8fbfd092e4a404f4b9576c19a16f65a25d43d8
|
||||||
size 49168
|
size 49206
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 21 19:12:35 CEST 2007 - aosthof@suse.de
|
||||||
|
|
||||||
|
- Save command for adding new section(s) (also multiple kernels) in
|
||||||
|
/boot/perl-BL_delayed_exec for delayed execution in the target
|
||||||
|
system. This script will be run by yast2-bootloader after the
|
||||||
|
installation of packages is finished (#309837)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Sep 21 15:13:09 CEST 2007 - aosthof@suse.de
|
Fri Sep 21 15:13:09 CEST 2007 - aosthof@suse.de
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
Name: perl-Bootloader
|
Name: perl-Bootloader
|
||||||
Version: 0.4.30
|
Version: 0.4.30
|
||||||
Release: 1
|
Release: 3
|
||||||
Requires: perl >= %{perl_version}
|
Requires: perl >= %{perl_version}
|
||||||
Requires: perl-gettext
|
Requires: perl-gettext
|
||||||
Requires: e2fsprogs
|
Requires: e2fsprogs
|
||||||
@ -66,6 +66,11 @@ install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/bootloader
|
|||||||
/usr/lib/bootloader
|
/usr/lib/bootloader
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Sep 21 2007 - aosthof@suse.de
|
* Fri Sep 21 2007 - aosthof@suse.de
|
||||||
|
- Save command for adding new section(s) (also multiple kernels) in
|
||||||
|
/boot/perl-BL_delayed_exec for delayed execution in the target
|
||||||
|
system. This script will be run by yast2-bootloader after the
|
||||||
|
installation of packages is finished (#309837)
|
||||||
|
* Fri Sep 21 2007 - aosthof@suse.de
|
||||||
- Save command for removal of old sections in
|
- Save command for removal of old sections in
|
||||||
/boot/perl-BL_delayed_exec for delayed execution in the target
|
/boot/perl-BL_delayed_exec for delayed execution in the target
|
||||||
system, script will be run by yast2-bootloader after installation
|
system, script will be run by yast2-bootloader after installation
|
||||||
|
Loading…
x
Reference in New Issue
Block a user