"J.A. Magallon" <[EMAIL PROTECTED]> writes:
> Hi all...
>
> This is about /sbin/instalkernel behaviour. I have noticed since time ago,
> but just now remembered to comment on the list.
> Let's suppose you have a setup like:
Ok i have just commited this to cvs :
--- installkernel.~1.27.~ Tue Nov 20 09:53:35 2001
+++ installkernel Tue Dec 4 14:12:54 2001
@@ -28,14 +28,28 @@
source /etc/sysconfig/installkernel
fi
+function read_link () {
+ #at this time we have perl since we do kernel copy
+ [[ -x /usr/bin/perl ]] && perl -e '{print readlink shift, "\n"}' $1
+}
+
function copy_image () {
local config=""
+ local link
+
if [[ -f .config ]];then
config=.config
elif [[ -f ../../../.config ]];then
config=../../../.config
fi
-
+
+ if [ -L $boot/vmlinuz ];then
+ link=$(read_link $boot/vmlinuz)
+ link=${link##*/} #make it relative
+ rm -f /boot/vmlinuz
+ [[ "${boot}/${link}" != "${boot}/vmlinuz-${version}" && -f ${boot}/${link} ]]
+&& ln -sf ${link} /boot/vmlinuz.old
+ fi
+
if [ -f $boot/vmlinuz ]; then
mv -f $boot/vmlinuz $boot/vmlinuz.old
fi
--
http://www.linux-mandrake.com/en/club/