Skip to content
Snippets Groups Projects
Commit dd0b91ac authored by Brian J. Murrell's avatar Brian J. Murrell
Browse files

b=13679

i=cliffw
i=yangsheg

Bring our post[un]install scripts more into line with SLES10's so that
we are installing the bootloader on SLES10 also.
parent c429895e
No related branches found
No related tags found
No related merge requests found
...@@ -406,7 +406,7 @@ for flavor in "" smp bigmem bigsmp pseries64 BOOT jensen ; do ...@@ -406,7 +406,7 @@ for flavor in "" smp bigmem bigsmp pseries64 BOOT jensen ; do
# than installed, so force modules.dep to be recreated # than installed, so force modules.dep to be recreated
echo "rm -f /lib/modules/%{KVERREL}${delim_flavor}/modules.dep" >> ${script} echo "rm -f /lib/modules/%{KVERREL}${delim_flavor}/modules.dep" >> ${script}
echo "if [ -f /etc/modprobe.conf ] ; then" >> ${script} echo "if [ -f /etc/modprobe.conf ] ; then" >> ${script}
sed -e "s^%ver_str^%{KVERREL}${delim_flavor}^g" %{SOURCE26} >> ${script} sed -e "s^%ver_str^%{KVERREL}${delim_flavor}^g" -e "s^%flavor^${flavor}^" %{SOURCE26} >> ${script}
echo "else" >> ${script} echo "else" >> ${script}
sed -e "s^%ver_str^%{KVERREL}${delim_flavor}^g" -e "s^%%{cfg_name}^${delim_flavor}^g" %{SOURCE29} >> ${script} sed -e "s^%ver_str^%{KVERREL}${delim_flavor}^g" -e "s^%%{cfg_name}^${delim_flavor}^g" %{SOURCE29} >> ${script}
......
...@@ -53,10 +53,30 @@ if test "$YAST_IS_RUNNING" != instsys ; then ...@@ -53,10 +53,30 @@ if test "$YAST_IS_RUNNING" != instsys ; then
fi fi
fi fi
if [ "$YAST_IS_RUNNING" != instsys -a -x /sbin/new-kernel-pkg ]; then if [ "$YAST_IS_RUNNING" != instsys ]; then
# Notify boot loader that a new kernel image has been installed. # Notify boot loader that a new kernel image has been installed.
# (during initial installation the boot loader configuration does not # (during initial installation the boot loader configuration does not
# yet exist when the kernel is installed, but yast kicks the boot # yet exist when the kernel is installed, but yast kicks the boot
# loader itself later.) # loader itself later.)
/sbin/new-kernel-pkg %ver_str if [ -x /sbin/new-kernel-pkg ]; then
/sbin/new-kernel-pkg %ver_str
elif [ -x /usr/lib/bootloader/bootloader_entry ]; then
# handle 10.2 and SLES10 SP1
/usr/lib/bootloader/bootloader_entry \
add \
%flavor \
%ver_str \
vmlinuz-%ver_str \
initrd-%ver_str
elif [ -x /sbin/update-bootloader ]; then
# handle 10.1 and SLES10 GA
/sbin/update-bootloader \
--add \
--image /boot/vmlinuz-%ver_str \
--initrd /boot/initrd-%ver_str
/sbin/update-bootloader --refresh
else
echo "You may need to setup and install the boot loader using the"
echo "available bootloader for your platform (e.g. grub, lilo, zipl, ...)."
fi
fi fi
...@@ -45,6 +45,23 @@ if [ "$(readlink /boot/$image$SHORTNM)" = $image-%ver_str ]; then ...@@ -45,6 +45,23 @@ if [ "$(readlink /boot/$image$SHORTNM)" = $image-%ver_str ]; then
shopt -u nullglob shopt -u nullglob
fi fi
# remove the bootloader entry for the kernel being removed
if [ -x /usr/lib/bootloader/bootloader_entry ]; then
# handle 10.2 and SLES10 SP1
/usr/lib/bootloader/bootloader_entry \
remove \
smp \
%ver_str \
vmlinuz-%ver_str \
initrd-%ver_str
elif [ -x /sbin/update-bootloader ]; then
# handle 10.1 and SLES10 GA
/sbin/update-bootloader --image /boot/vmlinuz-%ver_str \
--initrd /boot/initrd-%ver_str \
--remove --force
/sbin/update-bootloader --refresh
fi
# Check whether there is a .previous link to the image we're about # Check whether there is a .previous link to the image we're about
# to remove or to the image we point the new symlink to (so .previous # to remove or to the image we point the new symlink to (so .previous
# would be identical to the current symlink) # would be identical to the current symlink)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment